PINBALL // NEXTUI
Text
Polymorphic text component with body, caption, label, and code variants. Bungee for display, Space Grotesk for body.
$
Or install the base component for free:
Live Preview
Open full demoUsage
TSX
<Text variant="body">Real-time reactive graphics.</Text>Variants
<Text variant="body">Real-time reactive graphics.</Text>
<Text variant="caption">Last synced 30 seconds ago</Text>
<Text variant="label">ENGINE STATUS</Text>
<Text variant="code">const engine = new VisualEngine()</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>
)
}
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from PINBALL // NEXT
Button
Arcade button with primary, secondary, and ghost variants in three sizes. Magenta accent, chrome borders, uppercase Bungee labels. Renders as a Next.js Link when an href is provided.
Badge
Arcade badge with magenta, yellow, chrome, green, and cyan variants. Bold uppercase labels on dark surfaces.
Card
Arcade card with numbered index, tag badge, title, and description. Chrome borders with parallelogram clip-path shapes.