Variants & Attributes
A variant is a specific SKU — e.g. "iPhone 13, Blue, 128GB, Unlocked, Grade A". Every product has at least one variant.
Attributes
Attributes are the options customers pick from. Default attributes in Spectra:
| Attribute | Type | Examples |
|---|---|---|
color | swatch | Blue, Red, Space Gray |
storage | button | 64GB, 128GB, 256GB, 512GB |
condition | button | Like New, Good, Fair |
carrier | dropdown | Unlocked, Verizon, AT&T, T-Mobile |
screen_size | button | 13", 15", 16" |
How it works
- Admins define attributes globally
- Each product declares which attributes apply to it (e.g. laptops might not have
carrier) - Each variant has specific values for those attributes
- The storefront shows a selector — pick values until a single variant matches
Display types
Attributes can render as:
- Swatch — colored circles (best for colors)
- Button — rounded pill buttons (best for storage, size)
- Dropdown — select menu (best for long lists)
Variant fields
Beyond attributes, each variant has:
sku— unique SKUprice— selling pricecompare_at_price— optional MSRP (shown as strikethrough)quantity_available— live stock countweight_oz— for shipping calculationsimage_url— variant-specific image (overrides base image)exclusive_source_id— optional; restricts visibility to one tenant's domain
Creating variants
Variants are typically auto-generated by the inventory sync cron. Each unique combination of attributes in your inventory becomes a variant.
You can manually edit variant prices and availability in the admin product page.
Out-of-stock behavior
Variants with quantity_available = 0 are hidden in the attribute selector (grayed out). If all variants of a product are out of stock, the product shows "Currently unavailable" on the storefront.