Varianten-Swatch — ui.swatch
Farb-/Bild-Kachel für Produktvarianten. Die Produktfarbe ist ein CONTENT-Datum (Prop), kein Design-Token — Auswahl-Ring und Maße kommen aus Tokens. 1.1.0: Props size (xs|sm|md|fill), shape (circle|square) und interactive (false = statisches span ohne Event) ergaenzt
UI Elementv1.2.1Commerceweb.documentweb.applicationdesktop.shellbuilder.preview
Beispiele
Farbe, ausgewählt
Farbe, nicht ausgewählt
Ohne Farbwert (Platzhalter-Fläche)
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
label * | string | — |
color | string | "" |
imageUrl | string | "" |
active | boolean | false |
size | string: xs | sm | md | fill | "md" |
shape | string: circle | square | "circle" |
interactive | boolean | true |
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 | "" |
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--swatch-border-strong | var(--color-border-strong) |
--swatch-focus-ring-color | var(--focus-ring-color) |
--swatch-focus-ring-offset | var(--focus-ring-offset) |
--swatch-focus-ring-width | var(--focus-ring-width) |
--swatch-radius-full | var(--radius-full) |
--swatch-surface-sunken | var(--color-surface-sunken) |
--swatch-text-default | var(--color-text-default) |
Genutzte Design-Tokens
border.hairline color.border.strong color.surface.sunken color.text.default duration.fast easing.standard focus.ring-color focus.ring-offset focus.ring-width radius.full radius.sm size.10 size.3 size.6