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 text

Props

PropTypeDefaultDescription
sizeSizeMdText size: Xs, Sm, Md, Lg, Xl
weightFontWeightNormalFont weight: Normal, Medium, Semibold, Bold
colorTextColorDefaultText color: Default, Secondary, Muted
elementString"p"HTML element tag to render

Source

Styled: text.rs