BLUEPRINT // NEXTUI
Text
Polymorphic text primitive with body, caption, label, and code variants styled for the BLUEPRINT dark technical palette.
$
Or install the base component for free:
Live Preview
Open full demoUsage
TSX
<Text variant="label" as="span">BUILD STATUS</Text>Variants
<Text variant="body">Body copy renders here.</Text>
<Text variant="caption" as="span">Last deployed 12 min ago</Text>
<Text variant="label" as="span">BUILD STATUS</Text>
<Text variant="code" as="span">git push origin main</Text>
Source
TSX
import { cn } from '@/lib/utils'
type TextVariant = 'body' | 'caption' | 'label' | 'code'
type TextTag = 'p' | 'span' | 'div'
const TEXT_VARIANTS: Record<TextVariant, string> = {
body: 'bp-text-body',
caption: 'bp-text-caption',
label: 'bp-text-label',
code: 'bp-text-code',
}
interface TextProps {
variant?: TextVariant
as?: TextTag
className?: string
children: React.ReactNode
}
export function Text({
variant = 'body',
as: Tag = 'p',
className,
children,
}: TextProps): React.JSX.Element {
return (
<Tag className={cn(TEXT_VARIANTS[variant], className)}>
{children}
</Tag>
)
}
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from BLUEPRINT // NEXT
Button
Technical dark-mode button with primary, secondary, and ghost variants in three sizes. Renders as a Next.js Link when an href is provided.
Badge
Technical badge for status indicators and tags in the BLUEPRINT dark engineering palette.
Card
Engineering-blueprint card with registration-mark corner accents at all four corners. Composable with any children.