MERIDIAN // NEXTUI

Text

Polymorphic text primitive with body, caption, label, code, and mono variants. Renders as any block or inline HTML tag via the `as` prop.

$npx @voltenworks/shipui add text --theme meridian
Or install the base component for free:
Live Preview
Open full demo
voltenworks.com/shipui/meridian/demo/components#03-text
Usage
TSX
<Text variant="label" as="span">Total revenue</Text>
Variants
<Text variant="body">Body copy renders here.</Text>
<Text variant="caption" as="span">Last updated 2 hours ago</Text>
<Text variant="label" as="span">Total revenue</Text>
<Text variant="code" as="span">GET /api/users</Text>
<Text variant="mono" as="span">0x1A2B3C</Text>
Source
TSX
import type * as React from 'react'
import { cn } from '@/lib/utils'

interface TextProps {
  children: React.ReactNode
  variant?: 'body' | 'caption' | 'label' | 'code' | 'mono'
  as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3'
  className?: string
}

const variantClass: Record<NonNullable<TextProps['variant']>, string> = {
  body: 'mdn-text-body',
  caption: 'mdn-text-caption',
  label: 'mdn-text-label',
  code: 'mdn-text-code',
  mono: 'mdn-text-mono',
}

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, $49
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from MERIDIAN // NEXT
MERIDIAN // NEXTUI

Button

Dashboard button with primary (solid), secondary (outline), and ghost variants in three sizes. Renders as a Next.js Link when an href is provided.

MERIDIAN // NEXTUI

Badge

Status badge with six color variants: ice, green, amber, red, violet, and surface. Designed for dashboard labels, status indicators, and category tags.

MERIDIAN // NEXTUI

Card

Composable card with Card, CardHeader, and CardBody sub-components. Uses `mdn-card` CSS classes for consistent dashboard panel styling.

MERIDIAN // NEXTUI

StatusPill

Compact status indicator with five semantic states: ok, warn, err, idle, and info. Each state maps to a default label (Healthy, Degraded, Down, Idle, Info) that can be overridden via the label prop.