Usage
formatMessageProps.| Role / type | Purpose | Emphasis |
|---|---|---|
| Page / Section / Subsection / Title | Heading hierarchy, 24px down to 16px | One Page per view or major region; don’t skip levels. Nothing in the scale is larger than 24px |
| Subtitle / SubtitleMedium | Body copy, 14px (the default role) | SubtitleMedium for emphasis inside body copy |
| BodyMedium / Caption | Dense body copy and secondary metadata | Caption for secondary metadata, not for primary instructions alone |
| Label | Compact UI and action-aligned copy | Label for field labels |
| Overline | Eyebrows or badges | Use sparingly; test readability |
| Caption | Supporting one-line text | Secondary context without competing with body |
| Code1 / Code2 | Monospace literals | IDs, code, tokens; pick scale by density |
| Semantic colors | Status and tone | Pair with icons or text for color-blind users |
Text renders semantic elements (h1–h4 for display heading types, p or span for body and other types) with token-driven styling. Alignment, truncation, no-wrap, and transformation props adjust layout but should not fight the content’s natural reading pattern.
Pass value to Text from @prepared911/ui/text. type selects the text style. Digits roll to each new value. from is the number shown on first paint. roll={false} renders the formatted number as plain text. announcement is localized copy spoken after the roll settles, not on first paint.
formatMessage; plan for expansion in German and Romance languages.onClick on plain text.Success, Warning, Error) consistently with product meaning.span.h* vs p).formatMessage fragments must remain keyboard accessible when they include links or buttons.