---
title: "text.style: Style text range — Design kit command — Kition"
description: "Styles a character range of a text layer: font family, style, weight, size, line height, letter spacing, decoration, case, link and fills."
canonical: "https://developer.kition.ai/docs/kits/design/commands/text.style"
---

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

# text.style

**Style text range.** Styles a character range of a text layer: font family, style, weight, size, line height, letter spacing, decoration, case, link and fills.

- Kit: Design 0.1.0 (.kdesign); reference: [Design kit commands](https://developer.kition.ai/docs/kits/design.md)
- Changes the document: yes
- Acts on: `id` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `end` | `number` | no |  |
| `fontFamily` | `string` | no |  |
| `fontSize` | `number` | no |  |
| `fontStyle` | `string` | no |  |
| `fontWeight` | `number` | no |  |
| `hyperlink` | `string \| object \| null` | no |  |
| `id` | `integer \| string` | no |  |
| `letterSpacing` | `number \| object` | no |  |
| `lineHeight` | `number \| object` | no |  |
| `start` | `number` | no |  |
| `textCase` | `"original" \| "upper" \| "lower" \| "title" \| "smallCaps"` | no |  |
| `textDecoration` | `"none" \| "underline" \| "strikethrough"` | no |  |
| `textFills` | `object[]` | no |  |

## Call through design_run

```text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "text.style" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `end`, `fontFamily`, `fontSize`, `fontStyle`, `fontWeight`, `hyperlink`, `id`, `letterSpacing`, `lineHeight`, `start`, `textCase`, `textDecoration`, `textFills`. design_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": {
    "end": {
      "type": "number"
    },
    "fontFamily": {
      "type": "string"
    },
    "fontSize": {
      "type": "number"
    },
    "fontStyle": {
      "type": "string"
    },
    "fontWeight": {
      "type": "number"
    },
    "hyperlink": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "letterSpacing": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "lineHeight": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "start": {
      "type": "number"
    },
    "textCase": {
      "enum": [
        "original",
        "upper",
        "lower",
        "title",
        "smallCaps"
      ],
      "type": "string"
    },
    "textDecoration": {
      "enum": [
        "none",
        "underline",
        "strikethrough"
      ],
      "type": "string"
    },
    "textFills": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

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