DECK // NEXTUI

Text

Polymorphic text primitive with body, caption, label, and code variants. IBM Plex Mono body font. Renders as p, span, or div via the `as` prop.

$npx @voltenworks/shipui add text --theme deck
Or install the base component for free:
Live Preview
Open full demo
voltenworks.com/shipui/deck/demo/components#03-text
Usage
TSX
<Text variant="label" as="span">Category</Text>
Variants
<Text variant="body">Body copy renders here.</Text>
<Text variant="caption" as="span">Updated 3 days ago</Text>
<Text variant="label" as="span">Category</Text>
<Text variant="code" as="span">npm run build</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 DECK // NEXT
DECK // NEXTUI

Button

Skate deck art button with primary, secondary, and ghost variants in three sizes. Rough-cut clip-path corners, spray-paint orange accent. Renders as a Next.js Link when an href is provided.

DECK // NEXTUI

Badge

Spray-paint styled badge with four color variants: orange, yellow, ink, and dim. Suited for category labels, tags, and status indicators.

DECK // NEXTUI

Card

Composable card with Card, CardHeader, CardBody, and CardFooter sub-components. Dark woodgrain surfaces with spray-paint accent borders.