Text
Text component provides consistent typography with various variants, colors, and styling options for displaying content.
Examples
(8)Properties
(38)Playground
Basic Usage
Basic text usage with different variants and semantic elements.
Colors
Text color variants and custom color options for different contexts.
c (color shorthand)
c is a shorthand for color that resolves through the theme. Accepts:•
'dimmed' → maps to theme.text.muted•
Theme text keys (
'primary', 'secondary', 'muted', 'disabled', 'link')•
Palette names (
'primary', 'success', …) → palette shade-6 (readable text)•
'palette.shade' syntax ('primary.6')•
Any CSS color string
Weights
Different font weight options from light to bold.
Font family (ff shorthand)
ff is the shorthand alias for fontFamily. Both forms work; ff wins when both are set. The same alias is also accepted by Title, the H1–H6 / Code / Kbd / Bold / Italic aliases, Highlight, GradientText, ShimmerText, and the field components via labelProps / descriptionProps / disclaimerProps.Sizes
Different text sizes from small to large.
Heights
Line height control for text content using the
lineHeight prop.Usage
The
lineHeight prop accepts:•
Multipliers (e.g.,
1.5) - multiplied by the font size•
Absolute values (e.g.,
24) - treated as pixel values when > 3This provides precise control over text spacing and readability.
Tracking
Use the
tracking prop to adjust letter spacing for text. Negative values tighten spacing, positive values loosen it, and numeric tokens work alongside size and variant changes.•
Combine tracking with different
size values to balance compact and spacious typography.•
Headings can use subtle negative tracking for denser compositions.
•
Uppercase text often benefits from wider tracking to maintain legibility.
Scan to open this page on your phonereact-ui-library.com/components/Text
</>
react-ui-library
100+ accessible, themeable components that work seamlessly across iOS, Android, and Web.
A Platform Blocks product.
Quick Links
Resources