Text
A foundational typography component for rendering inline and block text.Text is the foundational typography component for rendering inline and block text. It provides consistent sizing, weight, and color options following the design system's type scale.
This is an enhanced version of the Text from Radix Themes.
Playground
Installation
Usage
Props
Sizes
Text supports sizes from 0 (smallest) to 12 (largest).
Weights
Control text weight with the weight prop.
Colors
Use semantic colors for different text purposes. Colored text reads a strong ink by default, so an error stays red and easy to read.
Emphasis
Use emphasis to rank text. loud is the strongest, medium is for secondary copy and quiet is for hints and metadata. Without color, the levels step down the gray scale. With color, they fade the same color.
Text with no color and no emphasis inherits its color, so it matches the Button or Card it sits in.
Semantic Elements
Use the as prop to render appropriate HTML elements.
Truncation
Truncate long text with ellipsis.
Text Alignment
Align text horizontally.
Responsive Props
Size and weight support responsive values.
Polymorphic Usage
Use asChild for custom elements while keeping Text styles.
© 2026 Kushagra Dhawan. Licensed under MIT. GitHub.