Features
Storefront
Variants & Attributes

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:

AttributeTypeExamples
colorswatchBlue, Red, Space Gray
storagebutton64GB, 128GB, 256GB, 512GB
conditionbuttonLike New, Good, Fair
carrierdropdownUnlocked, Verizon, AT&T, T-Mobile
screen_sizebutton13", 15", 16"

How it works

  1. Admins define attributes globally
  2. Each product declares which attributes apply to it (e.g. laptops might not have carrier)
  3. Each variant has specific values for those attributes
  4. 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 SKU
  • price — selling price
  • compare_at_price — optional MSRP (shown as strikethrough)
  • quantity_available — live stock count
  • weight_oz — for shipping calculations
  • image_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.