--- title: Variants order: 4 desc: Streamline your design workflow with Penpot's Components guide! Learn to create, duplicate, group, and manage reusable components. ---

Variants

Variants allow you to group similar components, such as buttons, icons, or toggles, into a single, customizable component. Rather than navigating through separate components for every possible state, size, or style, you can manage them all from one unified component using clearly defined properties.

Imagine a single button component that can switch between primary and secondary styles, active and disabled states, and small to large sizes. Useful, right? That’s the power of Variants.

Why are Variants Important?

Penpot – Variants release

Understanding variants: properties and values

A component’s variants are organized by properties and their values.

Each variant is simply one unique combination of values across all properties (for example, Color=Primary + Size=Small + State=Hover).

Variants must have at least one property, and property values should be kept consistent to make switching predictable and to preserve overrides across connected layers.

Create and modify variants

Create variants

You can create variants from an existing component or from another variant:

Variants creation button

When a variant is created:

Variant created

Manage variant properties

Properties are key to defining and differentiating your variants. They appear in the Design tab when a variant or component with variants is selected.

Add variant property
Add new properties
Edit properties
Edit variant property
Delete properties

Variants must have at least one property. You can’t delete the last one.

When multiple variants are selected, the Design tab will show all their properties and values. If a property has different values across the selected variants, it will display “Mixed,” allowing you to override them collectively.

Delete Variants

If you delete the last variant, the entire component is removed.

Restore Variants

If you have a copy of a variant whose original was deleted, you can restore it:

Toggle for boolean variants

When a variant property represents a boolean state, Penpot can display it as a toggle instead of a dropdown. This offers a quicker and more visual way to switch between two opposite values when working with copies.

The toggle appears in place of the property values dropdown, only when a copy is selected.

Boolean variant option

Accepted value pairs

For Penpot to recognize the property as a boolean and display the toggle, the property must be defined with exactly two opposing values. These can be any of the following pairs:

The order of the values does not matter. Penpot automatically maps them to ON and OFF states:

Use variants

Once you have created your variants, you can place a copy of a component with variants into your design and then switch between its different versions.

From the Assets tab

Drag and drop a component with variants from the Assets tab onto the design viewport, just like you would with any other component. Once placed, you can then use its properties in the Design tab to switch to the desired variant.

From the Design tab

When a variant is selected:

Using variants

Understanding overrides

A key benefit of variants is the ability to preserve overrides when you switch between them. An override is a specific change you make to a component instance that diverges from its original definition (e.g., changing text content or a specific color).

Layers between variants are considered connected if they:

  1. Share the same name.
  2. Are the same type. Rectangle, ellipse, paths, and boolean operations count as the same type.
  3. Have the same hierarchy level. Groups, boards, and layouts are considered equivalent.
Variants connections conditions

Example: If Variant 1 has a text layer named label with red color, and you change its content to Click here in an instance, then switch to Variant 2 (which also has a label text layer), the Click here content will be preserved, and Variant 2’s color will be applied.

Changing any of these (e.g., renaming or grouping a layer) breaks the connection, but reverting the change will restore it.

Bulk converting components to variants

If you already have multiple related components, you can combine them into a single component with variants:

Combining components as variants

Conditions:

When combined:

Transforming Variants Back into Components

To turn a variant into an independent component:

The new component’s name includes the original component name and the variant’s property values.