GAMING // NEXTUI
Text
Polymorphic text component with body, caption, label, and code variants. Chakra Petch for display, Space Grotesk for body.
$
Or install the base component for free:
Live Preview
Open full demoUsage
TSX
<Text variant="body">Sub-15ms matchmaking across 42 global regions.</Text>Variants
<Text variant="body">Sub-15ms matchmaking across 42 global regions.</Text>
<Text variant="caption">Last calibrated 30 seconds ago</Text>
<Text variant="label">QUEUE STATUS</Text>
<Text variant="code">const match = await queue.findRanked()</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 GAMING // NEXT
Button
Competitive gaming button with primary, secondary, and ghost variants in three sizes. Neon magenta accent, Chakra Petch labels, uppercase tracking. Renders as a Next.js Link when an href is provided.
Badge
Esports badge with magenta, cyan, and dim variants. Bold uppercase labels for status indicators and system tags.
Card
System card with title, description, and optional children slot. Dark surface with neon border accents for feature and data panels.