> ## Documentation Index
> Fetch the complete documentation index at: https://docs.subframe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Variants

> Create different visual styles for your component.

Variants let you create different visual styles for your component.

## How variants work

Every component has a **default variant**—how it looks with no changes applied.

<Frame>
  <img src="https://mintcdn.com/subframe-59800133/E2DcgNWNaQUj3Q4q/images/components/variant-default.png?fit=max&auto=format&n=E2DcgNWNaQUj3Q4q&q=85&s=d9cdd882de6abc9eb82e1de1209fc794" alt="The default variant of a Button component" width="426" height="206" data-path="images/components/variant-default.png" />
</Frame>

You can add variants to override styles. There are two types:

* **Boolean** — True or false (e.g. `disabled`)
* **Enum** — Multiple options (e.g. `variant` with primary, secondary, destructive)

Each variant only stores style overrides from the default—not the full design. When multiple variants are active, they layer together automatically.

For example, a button with `disabled` and `variant=destructive` variants:

* `disabled` changes opacity to 50%
* `destructive` changes background to red

<div style={{ display: "grid", gridTemplateColumns: "1fr 1fr", gap: "16px", alignItems: "flex-end" }}>
  <Frame caption="A boolean variant named 'disabled'">
    <img src="https://mintcdn.com/subframe-59800133/E2DcgNWNaQUj3Q4q/images/components/variant-disabled.png?fit=max&auto=format&n=E2DcgNWNaQUj3Q4q&q=85&s=87c9f3a57a02cc6d063f1e4df9e04c31" alt="The disabled variant of a Button component" width="345" height="137" data-path="images/components/variant-disabled.png" />
  </Frame>

  <Frame caption="An enum variant named 'variant'">
    <img src="https://mintcdn.com/subframe-59800133/E2DcgNWNaQUj3Q4q/images/components/variant-variant.png?fit=max&auto=format&n=E2DcgNWNaQUj3Q4q&q=85&s=4a83a4fc0cfe234aeb0334340900c6be" alt="The enum variant of a Button component" style={{ height: "100%", objectFit: "cover" }} width="433" height="118" data-path="images/components/variant-variant.png" />
  </Frame>
</div>

When both are active, you get a red button at 50% opacity.

<Frame caption="Composing both disabled and destructive variants on a Button component">
  <img src="https://mintcdn.com/subframe-59800133/E2DcgNWNaQUj3Q4q/images/components/variant-disabled-and-destructive.png?fit=max&auto=format&n=E2DcgNWNaQUj3Q4q&q=85&s=99a56146a4be61cf839c60bd99da13e2" alt="The composition of two variants on a Button component" width="207" height="118" data-path="images/components/variant-disabled-and-destructive.png" />
</Frame>

By defining each variant separately, you don't need to design every combination—just define what each variant changes.

## Creating a variant

1. Ensure you have nothing selected in design mode
2. On right-hand panel, click **Properties** > <Icon icon="plus" size={16} />
3. Select the type of variant to add

## Adding options to an enum variant

1. Ensure you have nothing selected in design mode
2. On right-hand panel, find the enum to add an option to
3. Click <Icon icon="plus" size={16} /> to add an option

## Modifying styles in a variant

1. Select the variant you want to modify
2. Select an element
3. Modify any property in the Inspector
4. An override indicator (pink dot) appears next to the property

<Frame>
  <img src="https://mintcdn.com/subframe-59800133/E2DcgNWNaQUj3Q4q/images/design-mode/overrides.png?fit=max&auto=format&n=E2DcgNWNaQUj3Q4q&q=85&s=f6d0125ae0975a4b703a125c6c8af011" alt="Inspector showing override with pink dot indicator" width="375" height="346" data-path="images/design-mode/overrides.png" />
</Frame>

To remove a variant override, click the pink dot to reset to the default value.
