Text

Text renders body copy in Mosaic. It renders as a <p> by default, forwards a ref to the underlying element, and themes its font-size and color through the size and color variants. Use the render prop when the copy belongs in a different element, such as a <span> inline.

Playground

Props

PropTypeDefaultValue
size'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl''sm'
color'primary' | 'neutral' | 'warning' | 'negative' | 'positive''primary'
render(props) => ReactNode
classNamestring
styleCSSProperties

Usage

import { Text } from '@clerk/ui/mosaic/components/text';

<Text
  size='sm'
  color='primary'
>
  This is a paragraph of body text.
</Text>

Examples

Sizes

Extra small text

Small text

Base text

Large text

Extra large text

2XL text

Colors

Primary text

Neutral text

Warning text

Negative text

Positive text