---
title: "element.style: Style — Board kit command — Kition"
description: "Sets style fields (colours, fill, stroke, dash, font, size, alignment, opacity, roundness) on the elements; each element takes only the fields its kind uses."
canonical: "https://developer.kition.ai/docs/kits/board/commands/element.style"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/board/commands/element.style](https://developer.kition.ai/docs/kits/board/commands/element.style)

# element.style

**Style.** Sets style fields (colours, fill, stroke, dash, font, size, alignment, opacity, roundness) on the elements; each element takes only the fields its kind uses.

- Kit: Board 0.1.0 (.kboard); reference: [Board kit commands](https://developer.kition.ai/docs/kits/board.md)
- Changes the document: yes
- Acts on: `ids` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | `string[]` | yes | The elements; each takes the fields its kind uses |
| `style` | `object` | yes |  |

## Call through board_run

```text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "element.style", "params": { "ids": <string[]>, "style": <object> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. board_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "ids": {
      "description": "The elements; each takes the fields its kind uses",
      "items": {
        "type": "string"
      },
      "type": "array",
      "x-khp-types": [
        "Element"
      ]
    },
    "style": {
      "additionalProperties": false,
      "properties": {
        "connectorType": {
          "description": "Connector route",
          "enum": [
            "straight",
            "elbow",
            "curved"
          ],
          "type": "string"
        },
        "dashStyle": {
          "description": "Line dashes",
          "enum": [
            "solid",
            "dashed",
            "dotted"
          ],
          "type": "string"
        },
        "endArrowhead": {
          "description": "Arrowhead at the end",
          "enum": [
            "none",
            "arrow",
            "dot",
            "triangle",
            "triangle-open",
            "diamond",
            "diamond-open",
            "circle-open",
            "bar"
          ],
          "type": "string"
        },
        "fillColor": {
          "description": "Fill colour: one of ink, gray, purple, green, orange, red, yellow, blue, white or #rrggbb",
          "type": "string"
        },
        "fillStyle": {
          "description": "How the shape is filled",
          "enum": [
            "none",
            "solid",
            "semi",
            "pattern"
          ],
          "type": "string"
        },
        "fontFamily": {
          "description": "Typeface",
          "enum": [
            "sans",
            "serif",
            "mono"
          ],
          "type": "string"
        },
        "fontSize": {
          "description": "Text size in board units",
          "maximum": 1000,
          "minimum": 1,
          "type": "number"
        },
        "opacity": {
          "description": "0 to 1",
          "maximum": 1,
          "minimum": 0,
          "type": "number"
        },
        "roundness": {
          "description": "Corner radius in board units",
          "maximum": 100000,
          "minimum": 0,
          "type": "number"
        },
        "startArrowhead": {
          "description": "Arrowhead at the start",
          "enum": [
            "none",
            "arrow",
            "dot",
            "triangle",
            "triangle-open",
            "diamond",
            "diamond-open",
            "circle-open",
            "bar"
          ],
          "type": "string"
        },
        "strokeColor": {
          "description": "Line or text colour: one of ink, gray, purple, green, orange, red, yellow, blue, white or #rrggbb",
          "type": "string"
        },
        "strokeSize": {
          "description": "Line weight",
          "enum": [
            "s",
            "m",
            "l",
            "xl"
          ],
          "type": "string"
        },
        "textAlign": {
          "description": "Text alignment",
          "enum": [
            "left",
            "center",
            "right"
          ],
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "ids",
    "style"
  ],
  "type": "object"
}
```

Generated from the command list of @kition/board-darwin-arm64@0.1.0 and the kit itself (board_commands through @kition/cli@0.1.1, built from KitionAI/kition-board@e78c190).
