---
title: "frame.fit: Fit frame to content — Board kit command — Kition"
description: "Resizes a frame to wrap its content with padding (32 units by default)."
canonical: "https://developer.kition.ai/docs/kits/board/commands/frame.fit"
---

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

# frame.fit

**Fit frame to content.** Resizes a frame to wrap its content with padding (32 units by default).

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The frame |
| `padding` | `number (≥ 0, ≤ 10000)` | no | Space around the content (32 by default) |

## Call through board_run

```text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "frame.fit", "params": { "id": <string> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `padding`. 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": {
    "id": {
      "description": "The frame",
      "type": "string",
      "x-khp-types": [
        "Element"
      ]
    },
    "padding": {
      "description": "Space around the content (32 by default)",
      "maximum": 10000,
      "minimum": 0,
      "type": "number"
    }
  },
  "required": [
    "id"
  ],
  "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).
