---
title: "data.fill: Fill copies with data — Design kit command — Kition"
description: "Repeats a frame once per data row, filling named text layers, fills and visibility from each row."
canonical: "https://developer.kition.ai/docs/kits/design/commands/data.fill"
---

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

# data.fill

**Fill copies with data.** Repeats a frame once per data row, filling named text layers, fills and visibility from each row.

- 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 |
| --- | --- | --- | --- |
| `dir` | `"right" \| "down"` | no |  |
| `format` | `object` | no |  |
| `formats` | `object` | no |  |
| `gap` | `number` | no |  |
| `id` | `integer \| string` | no | an id; the frame to repeat |
| `rows` | `object[]` | no | #rrggbb; true or text.fit's {maxLines?, minSize?, orphans?}: size the text to its box; the copy's name; every layer with that name in the copy; up to 500 rows |
| `scale` | `number` | no | default 1 |

## Call through design_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `dir`, `format`, `formats`, `gap`, `id`, `rows`, `scale`. 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": {
    "dir": {
      "enum": [
        "right",
        "down"
      ],
      "type": "string"
    },
    "format": {
      "additionalProperties": true,
      "type": "object"
    },
    "formats": {
      "additionalProperties": true,
      "type": "object"
    },
    "gap": {
      "type": "number"
    },
    "id": {
      "description": "an id; the frame to repeat",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "rows": {
      "description": "#rrggbb; true or text.fit's {maxLines?, minSize?, orphans?}: size the text to its box; the copy's name; every layer with that name in the copy; up to 500 rows",
      "items": {
        "additionalProperties": true,
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "scale": {
      "description": "default 1",
      "type": "number"
    }
  },
  "returns": "{ids (the copies, in row order), missing (keys no layer is named), files? (paths written, one per copy: same file names get a numbered suffix), errors? ([{id, path, error}] for exports that failed; the copies stay)}",
  "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).
