GLASS // NEXTUI

Text

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

$npx @voltenworks/shipui add text --theme glass
Or install the base component for free:
Live Preview
Open full demo
voltenworks.com/shipui/glass/demo/components#03-text
Usage
TSX
<Text variant="body">Your content renders here.</Text>
Variants
<Text variant="body">Your content renders here.</Text>
<Text variant="caption" as="span">Last synced 5 minutes ago</Text>
<Text variant="label" as="span">Region</Text>
<Text variant="code" as="span">us-east-1</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 GLASS // NEXT
GLASS // NEXTUI

Button

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

GLASS // NEXTUI

Badge

Frosted-glass badge with sky, indigo, cyan, violet, and emerald variants for tags and status indicators.

GLASS // NEXTUI

Card

Composable glassmorphism card container with frosted-glass surface and header, body, and footer sub-components.