---
title: "text.onPath: Type on a Path — Layout kit command — Kition"
description: "Puts text on a path, with a start distance, flip and alignment."
canonical: "https://developer.kition.ai/docs/kits/layout/commands/text.onPath"
---

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

# text.onPath

**Type on a Path.** Puts text on a path, with a start distance, flip and alignment.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `align` | `"baseline" \| "ascender" \| "descender" \| "center"` | no |  |
| `edge` | `string` | no | read by the command beside its listed parameters |
| `flip` | `boolean` | no |  |
| `id` | `string` | no |  |
| `start` | `number` | no | distance along the path in points |
| `text` | `string` | no |  |
| `to` | `string` | no | read by the command beside its listed parameters |

## Call through layout_run

```text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "text.onPath" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `align`, `edge`, `flip`, `id`, `start`, `text`, `to`. layout_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": {
    "align": {
      "enum": [
        "baseline",
        "ascender",
        "descender",
        "center"
      ],
      "type": "string"
    },
    "edge": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "flip": {
      "type": "boolean"
    },
    "id": {
      "type": "string",
      "x-khp-types": [
        "Item"
      ]
    },
    "start": {
      "description": "distance along the path in points",
      "type": "number"
    },
    "text": {
      "type": "string"
    },
    "to": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    }
  },
  "returns": "{story} — the text cursor goes into it",
  "type": "object"
}
```

Generated from the command list of @kition/layout-darwin-arm64@0.1.0 and the kit itself (layout_commands through @kition/cli@0.1.1, built from KitionAI/kition-layout@8767a18).
