

Create a component
- Select the frames or layers you want to reuse.
- Press ⌘ ⌥ K, or:
- Click Create component in the header of the properties panel.
- Right-click the selection and choose Create component.
- Open the command palette with ⌘ K and run Create component.
Open the Components panel
The Components panel sits in the left sidebar, under Pages and Layers. If it’s collapsed, click its title to open it. To show or hide it, open the Wonder menu > View > Panels > Components, or run Show Components Panel in the command palette. The panel lists every component in the file by name. In its header:- Grid view / List view switches how components are shown. In list view, each row also shows how many instances the component has.
- Search… finds a component by name, or by one of its variant values.
- Collapse all, which shows while a group is open, closes every open group.
/ to a component’s name to put it in a group. For example, forms/input puts input in a forms group. You can also drag a component onto another group.
Right-click a component for Place, Go to main component, Select all instances, Rename (F2) and Delete component, which says how many instances it has placed, such as Delete component (3 placed). If its main was deleted, the menu also has Restore main.
Place an instance
Place an instance in any of these ways:- Click a component in the Components panel. The instance goes inside the selected frame, after the selected instance, or in the middle of your view. Use ⇧-click or ⌘-click to select components in the panel instead.
- Drag a component from the panel onto the canvas.
- Open the command palette with ⌘ K and run Place followed by the component’s name, such as Place Button.
- Copy and paste the main or an instance in the same file. Duplicating a main or an instance (⌘ D) also makes an instance.
Edit the main component
Select the main and change it like any other design: its layers, layout, colors and text. The change reaches every instance on every page, and one ⌘ Z takes it back everywhere. At the top of the properties panel, the main’s section is headed with the component’s name. Once the main has instances, the Instances by page button in that header says how many and where when you point at it, such as Main component · 14 instances on 5 pages. Click it to see the instances page by page. Open Component options in that header for Select all instances, Description, Allow all overrides, Rename component and Remove component. Select all instances selects the instances on the page you’re on. An instance follows its main. You can’t add layers to it, move layers out of it or change the layers inside it, except for the styles its main lets instances override. Change the main instead, or give the main a property for what each instance should change.Add properties
Properties are what each instance can set for itself, such as a button’s label or whether it shows an icon.- Select the main and click + (Add property) in the header of its section in the properties panel.
- Type a Name and pick a Type:
- Text: the words of a text layer.
- Visibility: whether a layer is shown or hidden.
- Icon: which icon a layer shows.
- Image: which image a layer shows.
- Variant: see Add variants.
- Pick the Layer the property drives, or click the target button and pick it on the canvas.
- Click Create property.


Add variants
Variants are versions of a component, such as Primary and Secondary buttons, or Small, Medium and Large sizes.- Select the main and click + (Add property).
- Leave the Type as Variant, name it, and click Create property. The property starts with one value, Default.
- Open the property’s options and choose Edit property. Click Add value to add a variant, such as Variant 2, and rename the values there.
- Pick a value in the property’s row to edit that variant, then restyle it on the canvas.
Add states
States are how a component looks when someone interacts with it. Wonder names them the way CSS does::hover, :focus, :active (pressed) and :disabled, next to default.
- Select the main and click + (Add state) in its State row.
- Pick a state, such as
:hover. - With that state selected, change the main’s colors, borders, effects or visibility.


Let instances override styles
By default, an instance looks exactly like its main except for its property values. To let instances change a style of their own, select the main and click the diamond next to the style’s field. Its tooltip says Allow overrides. You can do this for Fill, Border color, Corner radius, Gap and Padding. To let instances change any style, choose Allow all overrides in Component options. When you turn an override off again, instances that had changed that style go back to the main’s.Change an instance
Select an instance. The section at the top of the properties panel, headed with the component’s name, shows:- A dropdown for each variant property.
- A field for each property: the words of a text, Shown or Hidden, an icon, an image or a nested component to swap in.
- A State dropdown.


Swap an instance
To replace an instance with another component, select it and open Instance options > Swap component, or right-click it and choose Swap instance. Pick the new component from the list. This works on an instance that isn’t inside another instance. To let instances swap a component nested in them, give the main a swap property (see Add properties).

Go to the main component
Select an instance and click Go to main component in the header of its section in the properties panel, or right-click it and choose Go to main component. Wonder opens the main’s page if it’s on another one and selects the main. To go back, run Back to instance in the command palette. When a layer inside an instance is selected, the properties panel shows In and the component’s name, with a button that goes to its main.Detach an instance or remove a component
- Detach instance (⌘ ⌥ B) turns an instance into a plain frame with the same look. It no longer follows the main. Instances nested inside it stay instances.
- Remove component, in the main’s Component options, turns the main back into a plain frame. Every instance on every page is detached and keeps its look.
- Delete component, in the Components panel, deletes the main. Every instance is detached and keeps its look.
Make and use components with an agent
Agents can create components, place instances of them, add properties, variants and states, and change mains for you. Ask in a Wonder Chat in the desktop app, or from any agent connected over Wonder MCP. For example:See and revert an agent’s change
When an agent changes a component, the chat shows what it reached, such as Changed Button · 9 instances on 3 pages. Click Revert to undo the agent’s change. Edits people made since stay, so a label someone changed after the agent’s edit is kept. Only the agent’s latest change to a component can be reverted from the chat. Anyone who can edit the file can revert it. A change that can’t be reverted says Revert unavailable instead.Use components in code
When you copy a design as code (right-click, then Copy as > Copy as code) or export it as Tailwind code, each component is written once, and each instance becomes a tag that uses it, with its property values. See Copy and export.If something goes wrong
- I don’t see the Components panel or Create component. Reload Wonder. To create or change components, you need edit access to the file.
- My agent doesn’t create components. Agents outside Wonder pick components up after you reconnect Wonder in them. See Wonder MCP.
- “Instances follow their main component. Change it there, or detach the instance.” You tried to change a layer inside an instance. Change the main, give the main a property for it, or detach the instance.
- “Expose this text on the main component to change it per instance”. The text has no property. Click Expose on main to give it one, then change it on the instance.
- “This is part of an instance. Detach the instance to make a new component from it.” A layer inside an instance can’t become a component. Detach the instance first.
- “A state changes only colors, borders, effects and visibility” or “Variants can’t move layers. Switch to Default to move them.” Move or resize layers in the Default variant and state.
- ”… is set on each instance, so variants and states can’t change it”. The layer is driven by a property, so its value comes from each instance, not from the variant or state.
- “Pasted as plain layers. Components can’t move between files yet.” You pasted into a file where you can’t create or change components. In a file you can edit, a copy you made brings its components along, with their mains in a frame called Components from and the other file’s name.
- “Pasted as plain layers. Wonder couldn’t confirm you made this copy.” Components come along only in a copy you made yourself. Copy the layers again, then paste.
- “Couldn’t copy as code” or “Couldn’t export as code”. A component in the selection is missing from the file. Detach those instances and try again.