Text
A paragraph or inline text element with configurable size, weight, and color.
TypographyNon-interactive
The quick brown fox jumps over the lazy dog. This is default body text with comfortable line height.
Secondary text for descriptions and supporting content.
Muted caption text for metadata and timestamps.
Bold text for emphasis.
text.rs
use stratum_leptos::*;
view! {
<Text>"Default body text."</Text>
<Text color=TextColor::Secondary>"Secondary."</Text>
<Text color=TextColor::Muted size=Size::Xs>"Caption."</Text>
<Text weight=FontWeight::Bold>"Bold."</Text>
}Installation
stratum add textProps
| Prop | Type | Default | Description |
|---|---|---|---|
| size | Size | Md | Text size: Xs, Sm, Md, Lg, Xl |
| weight | FontWeight | Normal | Font weight: Normal, Medium, Semibold, Bold |
| color | TextColor | Default | Text color: Default, Secondary, Muted |
| element | String | "p" | HTML element tag to render |