Skip to main content
Applies styling to text. Usually you don’t need it (plain strings work fine).

When to use Text

Don’t need it:
Need it:
Rule: only wrap in <Text> when you need to apply classes.

Props

PropTypeDescription
childrenReactNodeText content
classNamestringTailwind classes

Styling

Font weight

Font style

Colors

Sizes

Font family

Caps

Super/subscript


Formatting shortcuts

Instead of <Text className="font-bold">, use shortcuts:
Combine them:

Combining styles


Auto-generation

The React reconciler automatically wraps plain strings. This:
Internally becomes:
You never see this (it just works). Write plain strings, add <Text> only when styling.

Common patterns

Label + value

Colored keywords

Fine print

Code inline