LAB // NEXTUI

Text

Polymorphic text primitive with body, caption, label, and code variants styled for the LAB dark scientific palette.

$npx @voltenworks/shipui add text --theme lab
Or install the base component for free:
Live Preview
Open full demo
voltenworks.com/shipui/lab/demo/components#03-text
Usage
TSX
<Text variant="code" as="span">npm run experiment</Text>
Variants
<Text variant="body">Body copy renders here.</Text>
<Text variant="caption" as="span">EXP-07 initialized</Text>
<Text variant="label" as="span">Protocol</Text>
<Text variant="code" as="span">npm run experiment</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 LAB // NEXT
LAB // NEXTUI

Button

Scientific dark-theme button with primary, secondary, and ghost variants in three sizes. Renders as a Next.js Link when an href is provided.

LAB // NEXTUI

Badge

Lab-aesthetic badge with green and blue pill variants for experiment tags and status markers.

LAB // NEXTUI

Card

Feature card with an experiment code label, SVG icon (atom, grid, diamond, network, monitor, warning), description, and a colored pill tag.