Text
Body copy and secondary text with terminal-aesthetic styling.
Import
Usage
The Text component renders semantic HTML with terminal-aesthetic styling for body copy and secondary text.
This is default body text with monospace styling.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| as | 'p' | 'span' | 'div' | 'strong' | 'em' | 'small' | 'blockquote' | 'p' | HTML element to render |
| variant | 'body' | 'secondary' | 'muted' | 'caption' | 'body' | Visual variant |
| size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | - | Font size |
| transform | 'uppercase' | 'lowercase' | 'capitalize' | 'none' | - | Text transform |
| align | 'left' | 'center' | 'right' | - | Text alignment |
| truncate | boolean | false | Truncate text with ellipsis |
| mono | boolean | true | Use monospace font |
| children | React.ReactNode | - | Text content |
| className | string | - | Additional CSS class names |
Variants
Visual Variants
Body: Primary text for main content.
Secondary: Supporting text with reduced emphasis.
Muted: Subdued text for tertiary information.
Caption: Small text for labels and annotations.
Sizes
Extra Small (xs)
Small (sm)
Medium (md) - Default
Large (lg)
Extra Large (xl)
Semantic Elements
Paragraph element (default)
Span element for inline textStrong element for emphasisEm element for italicized textSmall element for fine printBlockquote element for citations
Text Transform
Uppercase text transform
LOWERCASE TEXT TRANSFORM
capitalize each word
Alignment
Truncation
This is a very long piece of text that will be truncated with an ellipsis when it exceeds the container width.