Text
Typography scale — 8 variants × 5 tones (import as Typography).
ui typography
Preview
Installation
npx slintcn@latest add textUsage
// alias to avoid shadowing the built-in Text:
import { Text as Typography, TextVariant, TextTone } from "slintcn/components/text.slint";
Typography { text: "Display"; variant: TextVariant.display; }
Typography { text: "Muted body"; variant: TextVariant.body; tone: TextTone.muted; }
Properties
variant
in
TextVariant
Type role — `display`, `title`, `body`, `body-sm`, `caption`.
tone
in
TextTone
Color role — `default`, `muted`, `subtle`.
API
TextVariantdisplayheadlinetitlebody-lgbodybody-smlabelcaptionTextTonedefaultmutedsubtleaccentdangerDependencies
theme only
Installed automatically as transitive dependencies of slintcn add text.