Invisible Docs
GalerieTokens

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

PropTypDefault
label *string—
colorstring""
imageUrlstring""
activebooleanfalse
sizestring: xs | sm | md | fill"md"
shapestring: circle | square"circle"
interactivebooleantrue
paddingstring: standard | none | sm | md | lg | xl"standard"
marginstring: standard | none | sm | md | lg | xl"standard"
borderstring: standard | none | hairline | strong"standard"
radiusstring: standard | none | control | surface | pill"standard"
textColorstring""
backgroundColorstring""
shadowstring: standard | none | sm | md | lg"standard"
widthstring: standard | full"standard"
alignSelfstring: standard | start | center | end"standard"
anchorstring""

Stellschrauben (Komponenten-Tokens)

TokenDefault
--swatch-border-strongvar(--color-border-strong)
--swatch-focus-ring-colorvar(--focus-ring-color)
--swatch-focus-ring-offsetvar(--focus-ring-offset)
--swatch-focus-ring-widthvar(--focus-ring-width)
--swatch-radius-fullvar(--radius-full)
--swatch-surface-sunkenvar(--color-surface-sunken)
--swatch-text-defaultvar(--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