Skip to main content
The create_artboard tool creates a new artboard — a named, bounded frame — on the DesignJS spatial canvas. Artboards are the primary way to organize multiple design screens or states on the same canvas. Each artboard has an explicit width and height, and you can place it at any X/Y position in canvas world coordinates. If you omit the position, the artboard is placed automatically to avoid overlapping existing frames. When you’re creating several artboards programmatically, use find_placement first to get non-overlapping coordinates, then pass those coordinates to create_artboard. The returned ArtboardData object includes the artboard’s ID, which you can pass to get_tree, get_screenshot, or get_html to scope those tools to the new frame.

Parameters

number
required
The width of the artboard in pixels. Must be a positive number.
number
required
The height of the artboard in pixels. Must be a positive number.
string
A display name for the artboard shown in the editor. Defaults to "Artboard N" where N is the next available number.
number
The X position of the artboard in canvas world coordinates. If omitted, the canvas places the artboard automatically to the right of existing artboards with an 80px gap.
number
The Y position of the artboard in canvas world coordinates. Defaults to 0 if omitted (when x is also omitted, the auto-placement logic determines both X and Y).

Response

object
required
The newly created artboard’s data.

Example

response
When creating multiple artboards in sequence, call find_placement with the intended dimensions before each create_artboard call to get coordinates that don’t overlap any existing frames.
Common artboard sizes: desktop (1440×900), laptop (1280×800), tablet (768×1024), mobile (390×844 for iPhone 14, 360×800 for Android). Use consistent sizes to make responsive design comparisons easier in the editor.