Bild — ui.image
Bild mit URL-Whitelist, Seitenverhältnis und Platzhalter-Fallback bei unsicherer Quelle. 1.2.0: scale=natural (opt-in) zieht Bilder nie über ihre Dateigröße. 1.3.0 (opt-in): imageWidth/imageHeight reservieren den Platz im Seitenverhältnis der Datei vor dem Laden (kein Springen beim Scrollen), skelet
UI Elementv1.7.0Inhaltweb.documentweb.applicationdesktop.shellemail.client
Beispiele
16:9, cover
Quadratisch, große Rundung
1.6: Hochformat auf 1:1, Fokus oben (Kopf bleibt sichtbar)
Unsichere src → Platzhalter
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
src * | string | — |
alt * | string | — |
ratio | string: auto | 1:1 | 4:3 | 16:9 | 3:2 | 3:4 | "auto" |
fit | string: cover | contain | "cover" |
maxWidth | string: none | 2xs | xs | sm | "none" |
focus | string: center | top | bottom | "center" |
rounded | string: none | md | lg | "md" |
caption | string | "" |
imageWidth | number | 0 |
imageHeight | number | 0 |
placeholderIcon | string | "" |
skeleton | boolean | false |
scale | string: fill | natural | "fill" |
iconSize | string: | sm | md | lg | xl | "" |
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 |
|---|---|
--image-radius | var(--radius-md) |
--image-icon-size | var(--size-5) |
Genutzte Design-Tokens
border.hairline color.border.default color.border.subtle color.surface.default color.surface.sunken color.text.muted container.2xs container.sm container.xs duration.slow radius.lg radius.md radius.none size.12 size.2 size.24 size.5 size.6 size.8 text.sm