Skip to main content

MixVariantPicker

Props

NameDescriptionTypeRequiredDefault
variantsA list of variants (VariantType from the API)Arraytrue-
variantsDataVariants picker data. A object consisting of variantDimensions, chosenSku and hasMultipleDimensions passed from MixVariantHandlerObjecttrue-
titleThe title for the pickerStringtrue-

Events

Event NameDescriptionParameters
close-content-panel--
changeSkuSku variant is changedchosen sku data (Object)
replaceProductNon sku variant is changedprod alias (String)

Methods

MethodDescriptionParameters
getChosenValueGet chosen value for specified levellevel (Number)
getStockGet stock status text for variant providedvariant (Object)
chooseVariantChoose variant. Emits relpaceProduct for non sku variants and changeSku for sku variantsvariant (Object)
getModifiersGet modifier classes for variant choice buttonvariant (Object)

Computed

ComputedTypeDescriptionFrom Store
variantTypeColorBooleanIs variants of type color?No
chosenLabelStringLabel of the chosen variantNo
variantsLevelNumberLevel of current variantsNo
chosenVariantObjectCurrently chosen variantNo
chosenHexStringCurrently chosen hex attribute if availableNo
chosenSkuObjectChosen sku objectNo

MixIns

MixIn
MixStockHandler