Variant Picker Pro
Premium swatch and size selector with sold-out detection. Replaces Swatch King.
Live preview
See it in action.
Fully interactive, drag, click, scroll inside the frame, toggle to mobile.
About this section
A polished variant picker for product pages. Auto-detects color options and renders them as round swatches; sizes render as pills. Sold-out variants are visibly disabled with a strike-through line. Selecting a variant with its own featured image swaps the gallery automatically, and the choice gets reflected in the URL so it survives reload.
Install in 90 seconds
- 01
Create /sections/modblo-variant-picker-pro.liquid.
- 02
Paste the section code and save.
- 03
Open product.json template and add the section where the existing variant picker lives.
- 04
Remove or hide your theme's default variant picker so they don't conflict.
- 05
(Optional) For color swatches to fill correctly, name color values with single words ('navy', 'sand', 'rose'). The CSS handle is used as the fill color.
The Liquid
Unlock the section code
Variant Picker Pro is a premium section. Get the full Liquid + scoped CSS paste-ready.
One-time purchase · Lifetime updates · You own the code
Theme editor settings
| Setting | Type | Default |
|---|---|---|
Product product Leave blank on PDPs to auto-bind. | product | , |
Add-to-cart label cta_label | text | Add to cart |
Background bg | color | #ffffff |
Foreground fg | color | #0b0b0c |
Accent accent | color | #6366f1 |
SEO & accessibility notes
- Real <button> elements throughout, full keyboard navigation.
- ARIA labels on swatches include the option name and sold-out state for screen readers.
- URL is updated with replaceState (not pushState), no history-stack pollution from variant browsing.
- Variant data is JSON-stringified and embedded once, no extra network calls during selection.
Related
