---
title: "layer.new.artboard: Artboard… — Photo kit command — Kition"
description: "Adds an artboard named `name` at `rect` or of a `preset` size, with a `background`; answers its id."
canonical: "https://developer.kition.ai/docs/kits/photo/commands/layer.new.artboard"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/photo/commands/layer.new.artboard](https://developer.kition.ai/docs/kits/photo/commands/layer.new.artboard)

# layer.new.artboard

**Artboard….** Adds an artboard named `name` at `rect` or of a `preset` size, with a `background`; answers its id.

- Kit: Photo 0.1.0 (PSD, PSB, or .kphoto); reference: [Photo kit commands](https://developer.kition.ai/docs/kits/photo.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `background` | `"white" \| "black" \| "transparent" \| "custom"` | no |  |
| `coalesce` | `string` | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
| `color` | `string \| number[] \| object` | no | [r,g,b]\|"#rrggbb"? (custom); custom |
| `height` | `number` | no | default: canvas size, right of the last board |
| `name` | `string` | no |  |
| `preset` | `string` | no | for example iPhone 14, Web 1920, A4 |
| `rect` | `number[]` | no | [x,y,w,h]? \| "x" |
| `width` | `number` | no |  |
| `x` | `integer` | no | The artboard's left edge, in pixels. |
| `y` | `number` | no |  |

## Call through photo_run

```text
photo_run {
  "path": "<file>.psd",
  "steps": [{ "command": "layer.new.artboard" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `background`, `coalesce`, `color`, `height`, `name`, `preset`, `rect`, `width`, `x`, `y`. photo_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": {
    "background": {
      "default": "white",
      "enum": [
        "white",
        "black",
        "transparent",
        "custom"
      ],
      "type": "string"
    },
    "coalesce": {
      "description": "Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.",
      "type": "string"
    },
    "color": {
      "description": "[r,g,b]|\"#rrggbb\"? (custom); custom",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "height": {
      "description": "default: canvas size, right of the last board",
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "preset": {
      "description": "for example iPhone 14, Web 1920, A4",
      "type": "string"
    },
    "rect": {
      "description": "[x,y,w,h]? | \"x\"",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "width": {
      "type": "number"
    },
    "x": {
      "description": "The artboard's left edge, in pixels.",
      "type": "integer"
    },
    "y": {
      "type": "number"
    }
  },
  "returns": "{layer, rect}",
  "type": "object"
}
```

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