variant-selector
Native select whose options are the values of a product option.
At a glance
variant-swatches
Buttons, one per value
- Built with
- A Custom element
- Inside
- One Custom element with the tag button: the template of every value.
variant-dropdown
A Webflow Dropdown
- Built with
- A Custom element around a Dropdown
- Inside
- One Dropdown link: the template of every value.
variant-popover
A panel that opens over the page
- Built with
- A Custom element with a popover inside
- Inside
- Links or buttons inside the popover element.
variant-selector
The browser's own select
- Built with
- A Custom element around a Select field
- Inside
- Only the Select field: Smootify writes its options.
variant-swatches
Every part, on each button
- ✓Color and image
option="bg-color""image" - ✓Name
option="title" - ✓Description
option="description" - ✓Other metaobject fields
option-metafield="key" - ✓Variant photo
option-variant="image" - ✓Price or difference
smootify-priceoption="price-difference"
variant-dropdown
Every part, on each link of the list
- ✓Color and image
option="bg-color""image" - ✓Name
option="title" - ✓Description
option="description" - ✓Other metaobject fields
option-metafield="key" - ✓Variant photo
option-variant="image" - ✓Price or difference
smootify-priceoption="price-difference"
variant-popover
Every part, on each link or button of the panel
- ✓Color and image
option="bg-color""image" - ✓Name
option="title" - ✓Description
option="description" - ✓Other metaobject fields
option-metafield="key" - ✓Variant photo
option-variant="image" - ✓Price or difference
smootify-priceoption="price-difference"
variant-selector
Text only: the browser draws the list
- –Color and image
- ✓Namewritten by Smootify
- –Description
- –Other metaobject fields
- –Variant photo
- ✓Price or difference
data-format="{{value}} {{difference}}"
More in the guide.
Where it can go
- Inside
smootify-product. - Not inside
.w-condition-invisible: a Webflow condition that hides the element takes it out. - Must contain
select. - Out of place, Smootify removes it from the page: also when its option is missing or Default Title.
What it requires
Nothing beyond Smootify: it works on every plan.
Attributes on the element
- It reads
data-option,data-option-name. - It reads
allow-unavailableonsmootify-add-to-cart. - Smootify writes
role,aria-labelon it: do not set them yourself.
Attributes inside it
| Group | Attribute name | Values |
|---|---|---|
| Selected value | selected-option | 5 |
Loading
Its code loads only on pages that have variant-selector.