Componentnavigation0.33 KB gzipZero dependencies
Text
Typographic paragraph primitive with default, muted, small, lead and mono variants.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add textOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Text } from "@/components/ui/text"; <Text variant="lead">Front-row seats, printed on demand.</Text>Source code
text.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxtext.tsx42 lines
import * as React from "react";import { cn } from "./lib/utils"; export interface TextProps { as?: "p" | "span" | "div"; variant?: "default" | "muted" | "small" | "lead" | "mono"; size?: "sm" | "md" | "lg"; className?: string; children?: React.ReactNode;} const variantClasses: Record<"default" | "muted" | "small" | "lead" | "mono", string> = { default: "text-foreground", muted: "text-muted-foreground", small: "text-xs text-muted-foreground", lead: "text-lg leading-relaxed text-foreground", mono: "font-mono text-[10px] uppercase tracking-[0.15em] text-muted-foreground",};Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Text } from "@/components/ui/text"; <Text />| Prop | Type | Description |
|---|---|---|
| as | "p" | "span" | "div" | Configures as. (Default: "p") |
| variant | "default" | "muted" | "small" | "lead" | "mono" | Visual style variant. (Default: "default") |
| size | "sm" | "md" | "lg" | Component size preset. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |
| children | React.ReactNode | Child elements rendered inside the component. |