Give a component more than one variant

Give a component a second look, such as open and closed, choose what switches it, and change text or links on click.

Updated 24 Nov 2026

A component can have more than one variant. A menu can be closed or open. A card can be plain or highlighted. Every copy of the component on your site can show a different variant.

Add a variant

  1. Open the component to edit it. Select "+ Variant" in the bar above the canvas.
  2. The canvas now shows every variant side by side, each with its name above it. The first one is named "Variant 1 · Primary".
  3. Select a variant, then change the component. Only that variant changes. The others stay as they were.
  4. Select the plus button after the last frame to add another variant.

The Layers list shows the same variants by name, with a tag for Primary, Variant, Hover or Pressed. Select one there to work on it.

Hover and pressed

Select "+ Hover / Pressed" under a frame to add a variant that shows while a visitor points at the component, or presses it. You can have one of each. They sit on top of whichever variant is showing. Touch screens have no pointing, so the hover variant does not play on a phone.

Choose how it changes

Select a layer inside the component, and open the Style panel. Scroll to the Interaction section.

The Transition row sits in that section, right after Draggable. It opens the transition settings:

  • Instant switches at once.
  • Ease plays over a time you set. It starts as "Ease in out" with a Bezier curve of 0.44, 0, 0.56, 1. You can pick another curve or draw your own.
  • Spring plays over a time with some Bounce. It starts at Time 0.4 and Bounce 0.2. Physics is there if you want to set it that way.

Every tab has a Delay, and Preview plays it. One transition covers the whole component.

Choose what makes it switch

Interactions lists what starts a switch. Select the plus button and choose "New transition". Fill in:

Setting What it does Default
On Click, Click start, Appear, Mouse enter or Mouse leave Click
Delay Seconds to wait before it switches 0
Off screen Appear only. Pause drops a waiting switch if the layer scrolls away. Play keeps it going Pause
Transition Once goes to one variant. Cycle steps through the variants in turn Once
Variant The variant to go to. Cycle does not use it none yet

An interaction belongs to the variant that is selected on the canvas. If a layer inside the component is selected, it belongs to that layer, so only that layer starts it. A plain layer with a Click or Click start interaction can be reached with the keyboard: it takes focus, and Enter or Space does the click.

The round handle on the selected frame adds a click interaction to the next variant in one step.

Visitors who ask their device for less motion see the switch happen at once.

Send your own event

Select the plus button in Interactions and choose "New event". A box named after your component opens, with the component's settings on the left and Events on the right. Type a name, then select Add. An interaction set to On: Event with that name runs when something else sends the event.

Set a variable on click

A variable is a value you give a component, such as a title or a link, so each copy can have its own. A click can change a variable while the visitor is on the page.

  1. Open the component. Select the plus button in Interactions. "Set Variable" is in the list only when the component has variables.
  2. Choose the variable. One that cannot be changed on click is greyed out, with the reason beside it.
  3. Fill in the box that opens:
Setting What it does Default
On What starts it, the same list as a variant switch Click
Delay Seconds to wait first 0
Variable The variable to change the one you chose
Value The new text, link or image address. For an on or off variable, choose On, Off or Toggle the variable's own value, or Toggle for an on or off variable

It changes these, and only these:

  • the text of a Text layer, the label of a Button, or the text of a Link (a Link with layers inside it is left as it is)
  • the link of a Button that has a link, or of a Link
  • the picture of an Image
  • whether a Button is disabled (a Button that has a link cannot be)
  • whether a layer is shown or hidden, when its Visible is a variable (see "Show or hide a layer with a variable" below). A layer can hide itself this way

Text is shown exactly as you typed it. Links and picture addresses must start with http, https, mailto, tel or sms, or be a path on your own site. Addresses that run a script are refused. Rich text, number, colour and pick-from-a-list variables cannot be set this way. A visitor who asks their device for less motion still sees the change, because nothing here moves.

Make a Ticker's speed a variable

Open a component that holds a Ticker. A small round plus sits before Speed, Hover and Draggable. Select it and choose "Create variable". The row now shows the variable's value, and each copy of the component can have its own speed. Select the filled circle and choose "Remove variable" to go back to a single setting. Speed stays between 0 and 1000 and Hover between 0 and 100.

Show or hide a layer with a variable

Open a component and select a layer inside it. At the top of the Style panel there is a Visible row with Yes and No. Choosing No hides the layer, the same as the eye in the Layers list.

To let each copy decide, select the small round plus before Visible and choose "Create variable". It makes an on or off variable that starts as the layer is now: Yes if the layer is showing. Each copy of the component can then turn that layer on or off. The row now edits the variable's starting value. Select the filled circle and choose "Remove variable" to go back to a single setting.

The same variable can be used in "Set a variable on click", so a click can show or hide the layer while the visitor is on the page. A layer that starts hidden is still on the page, ready to show.

Good to know:

  • The Visible row is not there for the top layer of a component. To hide the whole component, hide its copy on the page.
  • Hiding a layer for one screen size in the Layers list is separate. A layer hidden for a screen size stays hidden there, even when its variable says Yes.
  • A layer hidden with a plain Visible of No, and no click that can show it, is left off the published page.

Choose a variant for one copy

Select a copy of the component on a page. A section named after the component, tagged Component, has a Variant box. It starts on Primary. Pick the variant that copy starts with. "Edit component" takes you into the component.

Good to know

  • A variant can change styles such as colour, size and spacing. It cannot change text or pictures. To change those on click, use Set Variable.
  • The canvas shows the variants at the width of the screen size you have selected, so check a phone width as well as the desktop.
  • Switching variants needs JavaScript. With JavaScript off, each copy shows the variant it was placed with.

More in this topic

Back to Help centre

Still stuck?

Write to us and a person replies.

Email [email protected]