ObjectUIObjectUI

Text

Display text with standardized typography styles

The Text component displays text content with predefined typography variants.

Basic Usage

Simple Text

Hello, World!

Variants

Heading 1

Heading 1

Heading 2

Heading 2

Heading 3

Heading 3

Paragraph

Paragraph text

Lead

Lead text for introductions

Large

Large text

Small

Small text

Muted

Muted text

Schema

interface TextSchema {
  type: 'text';
  content: string;           // Text content to display
  value?: string;            // Alias for content
  variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'p' | 'lead' | 'large' | 'small' | 'muted';
  align?: 'left' | 'center' | 'right' | 'justify';
  color?: string;            // Tailwind color class
  className?: string;        // Additional CSS classes
}

Examples

Colored Text

Text With Colors

Primary TextDestructive TextMuted Text

Text Alignment

Text Alignment

Left aligned textCenter aligned textRight aligned text

On this page