---
title: "stroke.copy: Copy stroke — Design kit command — Kition"
description: "Copies one stroke of a layer with its weight, alignment, caps, joins and dashes so stroke.paste can apply it."
canonical: "https://developer.kition.ai/docs/kits/design/commands/stroke.copy"
---

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

# stroke.copy

**Copy stroke.** Copies one stroke of a layer with its weight, alignment, caps, joins and dashes so stroke.paste can apply it.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer \| string` | no |  |
| `ids` | `(integer \| string)[]` | no | the first layer |
| `index` | `integer` | no | a position counted from 0 (the first is 0); default the top stroke |

## Call through design_run

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

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

## Result



```json
{}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "the first layer",
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "index": {
      "description": "a position counted from 0 (the first is 0); default the top stroke",
      "type": "integer"
    }
  },
  "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).
