Webflow maintenance

How do I add a variant to a Webflow component?

Add a named Webflow component variant, style that look on the main component, and pick it on one instance.

THE SHORT ANSWER

Edit the main component. In the Navigator, click the plus icon next to Variants, click the plus icon again, name the variant, and press Enter. A component has one variant property and any number of variants. Styles on the base variant are shared. Styles on another variant apply only there. On an instance, choose the variant from the Variants dropdown. The base variant cannot be deleted.

Add a named variant on the main component

A variant is a predefined look for a component you already have. A solid button and an outline button can be two variants of one button component. A card can be horizontal in one place and vertical in another. You choose the variant on each instance. You do not need a second component for that second look.

Edit the main component first. In the Navigator, click the plus icon next to Variants. Click the plus icon again. Type a unique name, such as Outline, and press Enter. Webflow also says you can add a variant from the Variant button on the component canvas, or manage variants from the Style panel.

A component can have only one variant property. There is no separate limit on how many variants sit inside that property. The base variant is the one you started with. It cannot be deleted.

Example: a Button component is already on the homepage and on the contact page. The homepage buttons should stay filled. The contact page needs the same button with an outline. Outline is the new variant. The homepage instance can stay on the base.

Style that variant, then check the base

Styles you edit on the base variant are shared across all variants. Styles you edit while another variant is selected apply only to that variant. Select Outline, then change the background, the border, or the type for that variant. Switch back to the base and confirm the filled button did not pick up the outline.

Webflow's variants article says you can use conditionals to show, hide, and change content based on the current variant. This page is the named style variant. The property guide is how one instance gets different text, an image, or a link. A free-form font size on a single instance is not a variant. Webflow points that case to the class custom attribute, which is a different control from this dropdown.

Creating the component itself is a separate step. The create guide is how a nav, a footer, or a button becomes a component before any variant exists.

Choose the variant on one instance

Select the component instance on the page. The Props panel opens. Choose the variant from the Variants dropdown. The contact page button can be Outline. The homepage button can stay on the base. Both are still the same component.

The base variant is the default on instances until you change that default. To pick a different default, edit the main component, open the Properties panel with the Properties icon or press K, click the Variant property, and choose a variant from the Defaults dropdown. You can rename that property in the same place. Type a unique property name and press Return. You can also add the property to a group from that panel.

Example: after Outline exists, a new Button instance still arrives as the filled base. The contact page is the one place you set Outline. A later edit to the base label still reaches both looks, because the shared part of the component did not split.

Rename, reorder, duplicate, or delete

Edit the main component and open the Navigator. Drag a variant to reorder it. Webflow reorders the frames on the component canvas to match. Double-click a name to rename it, type a unique name, and press Enter.

To copy a variant, hover it, click the more options dots, and click Duplicate. Name the copy and press Enter. To delete one, hover it, click the more options dots, click Delete, and confirm in the pop-up. Instances that used the deleted variant revert to the default variant. They do not keep the deleted look. The base variant cannot be deleted, so that confirm step is not how you remove the original look.

If one page needs a button that should leave the component entirely, unlinking is the exit, and the create guide covers that choice. A variant is how you stay inside the component and still offer two defined looks.

Check both pages before you publish

Open the homepage and the contact page in the Designer. Read the label and try the link on each button. The variant changes the look you styled on that variant. It does not, by itself, change the destination. Set the link on the instance, or with a property, if the contact button should open a different page from the homepage button.

Publish, then click each button on the live site. A variant that looks right only in the Designer is not on the live site yet. If Outline appears on the homepage as well, that instance's Variants dropdown is set to Outline. Set it back to the base.

A variant on a component you already use is ordinary component work. The membership is one plan for every existing Webflow site: $999 per month, including 10 hours of Webflow work. Additional work is $75 per hour and starts only after you approve a written estimate.

Questions & answers

I styled Outline and the filled button changed too. What was selected?

You edited the base variant. Styles on the base are shared by every variant. Select Outline in the Navigator before you change the background or the border.

Can one component have two variant dropdowns?

No. A component can have only one variant property. You can add as many named variants as you need inside that single property.

I deleted Outline. Why did the contact button turn solid?

Instances that used the deleted variant revert to the default variant. The base is the default unless you chose another one. The deleted look is not kept.

Do I need a variant when every button looks the same?

No. Add a variant when an instance should use a look you defined in advance, such as solid or outline. An identical button everywhere does not need one.

Sources & further reading

Need a hand with your Webflow site?

View membership