Varianten-Picker — component.variant-picker
Produktvarianten wählen: Farb-Swatches (ui.swatch) + Größen-Pills mit Verfügbarkeit — Controller pflegt die Auswahl und emittet variante. 1.1.0: opt-in nativePart (root/group/value) für Variantenwahl aus CMS-Vorlagen mit Varianten-Matrix. 1.2.0: opt-in swap – Variantenwechsel ohne Neuladen (Bereiche
Beispiele
Farb-Swatches + Größen-Pills mit ausverkaufter Größe (klicken wechselt die Auswahl)
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
colorLabel | string | "Farbe" |
colors | array | [] |
sizesLabel | string | "Größe" |
sizes | array | [] |
sizeChartLabel | string | "" |
nativePart | string: none | root | group | value | "none" |
title | string | "" |
groupKey | string | "" |
label | string | "" |
valueKey | string | "" |
stateMarker | string | "" |
matrixMarker | string | "" |
swap | string | "" |
sizeChartUrl | string | "" |
padding | string: standard | none | sm | md | lg | xl | "standard" |
margin | string: standard | none | sm | md | lg | xl | "standard" |
border | string: standard | none | hairline | strong | "standard" |
radius | string: standard | none | control | surface | pill | "standard" |
textColor | string | "" |
backgroundColor | string | "" |
shadow | string: standard | none | sm | md | lg | "standard" |
width | string: standard | full | "standard" |
alignSelf | string: standard | start | center | end | "standard" |
anchor | string | "" |
Events & Slots
Events: variant
Slot default: akzeptiert ui.*, component.variant-picker
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--variant-picker-border-strong | var(--color-border-strong) |
--variant-picker-radius-control | var(--radius-control) |
--variant-picker-surface-default | var(--color-surface-default) |
--variant-picker-surface-sunken | var(--color-surface-sunken) |
--variant-picker-text-default | var(--color-text-default) |
--variant-picker-text-disabled | var(--color-text-disabled) |
--variant-picker-text-muted | var(--color-text-muted) |
Genutzte Design-Tokens
border.hairline color.border.strong color.status.danger color.surface.default color.surface.sunken color.text.default color.text.disabled color.text.muted duration.fast easing.standard focus.ring-color focus.ring-offset focus.ring-width font.family.default radius.control size.12 size.2 size.4 text.md text.sm weight.semibold