Design Systems
Components and instances
A component is a frame defined once and shown many times. Each showing is an instance: it draws what the component holds and follows every change to it. An instance can still differ where it must (a label, a color, an icon). Build buttons, fields, cards and bars as components from the first screen, and a restyle later is one edit instead of two hundred.

Make a component#
- Select a frame or a few layers and choose Arrange › Make Component (⌥⌘K).
- Open Components on the rail to see it listed. Press I (Insert) to place an instance, or right-click a component in the panel and choose Place in the View.
- To edit the original later, select an instance and choose Arrange › Go to Main Component.
Make a primary button component: 44 tall, 20 padding at the sides, blue, radius 10, a small white dot and the label "Continue". Then place an instance of it at 0, 80.
The agent calls create_nodes with kind component:
{
"nodes": [
{
"kind": "component", "name": "Button", "x": 0, "y": 0, "width": "hug", "height": 44, "fill": "#2F6BFF", "corner_radius": 10,
"layout": {"direction": "horizontal", "gap": 8, "padding": [0, 20], "align": "center", "cross_align": "center"},
"children": [
{"kind": "ellipse", "name": "Dot", "width": 8, "height": 8, "fill": "#FFFFFF"},
{"kind": "text", "name": "Label", "text": "Continue", "font_family": "Inter", "font_size": 15, "font_weight": 600, "fill": "#FFFFFF"}
]
}
]
}
and again for the instance, with the id the first call returned:
{"nodes": [{"kind": "instance", "component": "COMPONENT_ID", "x": 0, "y": 80}]}
To make a component of layers that are already there, it calls arrange_nodes with "action": "component".
Give the component auto layout and a width that hugs. An instance with a longer label is then wider by itself.
Instances and overrides#
An override is a change one instance makes to one layer inside it. The instance follows the component in everything else, and keeps its overrides when the component changes.
By hand, select a layer inside an instance and change it in the inspector: its text, fill, stroke, opacity, radius, size. Deleting a layer inside an instance hides it there.
An agent gives overrides: each names a target (the id of a layer inside the component) and the properties to change.
{
"nodes": [
{
"kind": "instance", "component": "COMPONENT_ID", "x": 0, "y": 160,
"overrides": [
{"target": "LABEL_ID", "text": "Delete account"},
{"target": "COMPONENT_ID", "fill": "#D92D20"}
]
}
]
}
A property given as null follows the component again, and {"target": "LABEL_ID", "reset": true} removes all of that layer's overrides. An instance cannot add, remove or reorder layers: that is what slots are for.
Properties#
Overrides reach into a component by layer. Properties give the useful ones a name, so that whoever uses the button sees Label and Has dot and nothing else.
A property is one of three types: text (what a text says), visible (whether a layer is shown) or swap (which component an instance inside shows, for an icon).
- Select a layer inside the component. The inspector shows Instances can change, with a switch for Its text, Whether it is shown or Which component it is.
- Switch on what instances may change.
- Select an instance: the Component section now has a field, a switch or a menu for each property.

The agent calls update_nodes on the component:
{
"changes": [
{
"id": "COMPONENT_ID",
"properties": [
{"name": "Label", "type": "text", "target": "LABEL_ID"},
{"name": "Has dot", "type": "visible", "target": "DOT_ID"}
]
}
]
}
An instance then gives them values with set:
{"nodes": [{"kind": "instance", "component": "COMPONENT_ID", "x": 0, "y": 240, "set": {"Label": "Sign in", "Has dot": false}}]}Variants and states#
A component set is a frame that holds several components: the variants of one thing. Each says which it is with variant, such as {"State": "Hover"} or {"Size": "Large", "Tone": "Danger"}. An instance chooses a variant and shows that component.
The quickest set is the states of something pressed. Arrange › Add States turns a component into a set with Normal, Pressed, Disabled and Selected, a copy for each, the disabled one at 40% opacity. Then redraw each copy.

Give the Button component hover, pressed and disabled states. Hover a little lighter, pressed darker.
The agent calls add_states:
{"node": "COMPONENT_ID", "states": ["Normal", "Hover", "Pressed", "Disabled"]}
It returns the set and the node of every state. The agent recolors them with update_nodes, and an instance shows one with:
{"changes": [{"id": "INSTANCE_ID", "variant": {"State": "Pressed"}}]}Without states, the four defaults are made; Hover is added only when named, since a phone's or a game's buttons have none. In Review (⌘2), an instance shows Pressed while the pointer is held on it, Hover while the pointer is over it, and Selected once clicked.
For variants that are not states, make the set yourself: a frame with component_set: true whose children are components, each with its variant. By hand, select a set and open Variant in the inspector to rename a property or a value, or Add Property.
Each variant has its own layers, so each offers its own properties. If you add states to a component that already has properties, set properties again on each new state, pointing at that state's own layers. An instance then keeps its label when it changes state. Adding the states first and the properties after avoids the second pass.
Slots#
A slot is a frame inside a component that each instance may fill with layers of its own. Use it where the content differs in kind and not only in words: the body of a card, the rows of a menu, the actions of a dialog.

Give the slot a layout, and whatever an instance puts in it is laid out like the rest.
In the component, the frame carries "slot": true. The agent fills it on an instance with slots, in create_nodes or update_nodes:
{
"nodes": [
{
"kind": "instance", "component": "CARD_ID", "x": 0, "y": 0,
"overrides": [{"target": "TITLE_ID", "text": "Storage"}],
"slots": [
{
"target": "SLOT_ID",
"children": [
{"kind": "text", "text": "64 GB of 100 GB", "font_family": "Inter", "font_size": 13, "fill": "#111318"},
{"kind": "rectangle", "width": "fill", "height": 8, "corner_radius": 4, "fill": "#2F6BFF"}
]
}
]
}
]
}
{"target": "SLOT_ID", "reset": true} shows the component's own content again.
By hand, select the instance and open Slots in the inspector. Each slot is a menu: As the Component, Its Own Content, or one of the file's components to show there.
Detaching#
Detaching replaces an instance with ordinary layers, a copy of what it showed. It no longer follows the component. Detach when a design has truly left the system, not to make a small change: an override or a property does that and keeps the link.
By hand: Arrange › Detach Instance (⌥⌘B). An agent calls update_nodes:
{"changes": [{"id": "INSTANCE_ID", "detach": true}]}
To share components between files, see Libraries.