Docs

·

Layout and systems

Components and variants

Make a component once, use copies everywhere, and add variants for states and sizes like Hover, Pressed and Large.

A component is a design you make once and reuse. Every copy follows the main component, so when you change the main one, every copy updates.

Make a component

  1. Select the layers or frame you want to reuse, such as a button or a card.

  2. Press ⌥⌘K, or choose Make component.

  3. The original becomes the main component. Open Components in the left rail to find it.

Use copies

  • Drag a component from the Components panel onto the canvas, or duplicate a copy with ⌘D.

  • Change a copy's text or photo without breaking the link. Layout, color and structure still follow the main component.

  • A copy can hide layers it does not need, such as an icon.

  • From a copy, jump to its main component to edit the original.

Add variants

Variants are versions of one component for different states or sizes.

  1. Select the main component.

  2. Add a variant for each state or size, such as Hover, Pressed or Large.

  3. Design each variant.

  4. On any copy, switch between variants from its properties.

States for a single layer

Any layer that is not a frame can also have States in the panel: hover, focus, disabled, loading and error. Pick a state to design how the layer looks in it, then pick default to go back. States show in Run and in Handoff.

Share components between files

Publish components in a library and use them in other files.

Questions

What is the difference between a variant and a state?

A variant is a whole version of a component, picked on each copy. A state is how one layer looks on hover, focus and so on.

I changed a copy and now it does not update.

Text and photo changes stay on the copy on purpose. Other changes to the main component still flow through.

Can I detach a copy?

Yes. Detaching turns it into ordinary layers that no longer follow the main component.

Next

Variables and modes