Rich Text — ui.richtext
Sanitisierter Rich-Text: Fliesstext-Semantik (h3-h6, Listen, Tabellen, mark/kbd/sub/sup/abbr/time, dl, figure) + Ton-Spans aus festem Vorrat (data-tone)
Beispiele
Fließtext mit Auszeichnungen
Normaler Text mit fett, kursiv, code und einem Link.
- Erster Punkt
- Zweiter Punkt
- verschachtelt
HTML5-Semantik: mark, kbd, sub/sup, abbr, dl
Hervorgehoben · Formel: H2O und E=mc2 · Kürzel: Strg + K · ABK · Kleingedrucktes
- Definition
- zentraler Baustein in der Registry
- Instanz
- konkrete Verwendung mit Props
Ton-Spans (fester Vorrat, keine freien Farben)
Erfolgreich · Warnung · Fehler · Hinweis · Nebensatz · Akzent
Unerlaubtes wird neutralisiert
Sicher, freie Farbe fliegt raus, style auch.
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
html * | 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 | "" |
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--richtext-color | var(--color-text-default) |
Genutzte Design-Tokens
border.emphasis border.hairline color.border.default color.border.strong color.border.subtle color.status.danger color.status.info color.status.success color.status.warning color.status.warning-surface color.surface.sunken color.text.default color.text.link color.text.muted font.family.default font.family.mono leading.base radius.md radius.sm size.1 size.2 size.3 size.4 size.5 text.lg text.md text.sm text.xs weight.semibold