HAIKU // NEXTUI
Text
Polymorphic text primitive with body, caption, label, and code variants styled for the HAIKU minimal Japanese light palette.
$
Or install the base component for free:
Live Preview
Open full demoUsage
TSX
<Text variant="caption" as="span">Spring 2026 collection</Text>Variants
<Text variant="body">Body copy renders here.</Text>
<Text variant="caption" as="span">Spring 2026 collection</Text>
<Text variant="label" as="span">Series</Text>
<Text variant="code" as="span">haiku-text-body</Text>
Source
TSX
import { cn } from '@/lib/utils'
type TextVariant = 'body' | 'caption' | 'label' | 'code'
type TextAs = 'p' | 'span' | 'div'
interface TextProps {
variant?: TextVariant
as?: TextAs
className?: string
children: React.ReactNode
}
const VARIANT_CLASSES: Record<TextVariant, string> = {
body: 'haiku-text-body',
caption: 'haiku-text-caption',
label: 'haiku-text-label',
code: 'haiku-text-code',
}
export function Text({
variant = 'body',
as: Tag = 'p',
className,
children,
}: TextProps): React.JSX.Element {
return (
<Tag className={cn(VARIANT_CLASSES[variant], className)}>
{children}
</Tag>
)
}
Works withNext.js 15React 19Tailwind v4TypeScript 5
More from HAIKU // NEXT
Button
Japanese-inspired light-mode button with primary, secondary, and ghost variants in three sizes. Renders as a Next.js Link when an href is provided.
Badge
Minimalist badge for tags and labels in the HAIKU Japanese-inspired light palette.
Card
Composable light card with header, body, and footer sub-components in the HAIKU minimal Japanese aesthetic.
Pullquote
Serene editorial blockquote with a ruled left accent, typographic quote marks, and an optional attribution citation.
Seal
Circular hanko-style seal displaying a kanji character with an optional label. Available in red and neutral variants at configurable sizes.