CONTOUR // NEXTUI

Text

Polymorphic text component with body, caption, label, and code variants. IBM Plex Mono for labels and code, Space Grotesk for body.

$npx @voltenworks/shipui add text --theme contour
Or install the base component for free:
Live Preview
Open full demo
voltenworks.com/shipui/contour/demo/components#03-text
Usage
TSX
<Text variant="body">Signal processing complete.</Text>
Variants
<Text variant="body">Signal processing complete.</Text>
<Text variant="caption">Last updated 2 minutes ago</Text>
<Text variant="label">STATUS</Text>
<Text variant="code">const signal = await fetch(endpoint)</Text>
Source
TSX
import { cn } from '@/lib/utils'

type TextVariant = 'body' | 'caption' | 'label' | 'code'
type TextElement = 'p' | 'span' | 'div' | 'h2' | 'h3' | 'h4'

interface TextProps {
  children:   React.ReactNode
  variant?:   TextVariant
  as?:        TextElement
  className?: string
}

const variantClass: Record<TextVariant, string> = {
  body:    'text-body',
  caption: 'text-caption',
  label:   'text-label',
  code:    'text-code',
}

export function Text({
  children,
  variant = 'body',
  as: Tag  = 'p',
  className,
}: TextProps): React.JSX.Element {
  return (
    <Tag className={cn(variantClass[variant], className)}>
      {children}
    </Tag>
  )
}
Preview in theme demoGet full theme, $29
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from CONTOUR // NEXT
CONTOUR // NEXTUI

Button

Dark topographic button with primary, secondary, and ghost variants in three sizes. Neon green accent on midnight navy. Renders as a Next.js Link when an href is provided.

CONTOUR // NEXTUI

Badge

Topographic badge with neon, cream, warning, error, and info variants. Monospace labels on dark surfaces.

CONTOUR // NEXTUI

Card

Data card with icon, tag badge, title, and description. Supports wide variant for featured layouts. Midnight navy surface with neon green accents.