Componentnavigation0.45 KB gzipZero dependencies
Heading
Semantic heading with level-based scale, optional mono eyebrow and per-level entrance animation.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add headingOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Heading } from "@/components/ui/heading"; <Heading level={2} eyebrow="Section 01">Ticket sales open</Heading>Source code
heading.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxheading.tsx49 lines
import * as React from "react";import { cn } from "./lib/utils"; export interface HeadingProps { level?: 1 | 2 | 3 | 4 | 5 | 6; size?: "lg" | "md" | "sm"; eyebrow?: string; className?: string; children: React.ReactNode;} const levelClasses: Record<1 | 2 | 3 | 4 | 5 | 6, string> = { 1: "text-3xl font-extrabold tracking-tight", 2: "text-2xl font-bold tracking-tight", 3: "text-xl font-bold", 4: "text-lg font-semibold", 5: "text-base font-semibold", 6: "text-sm font-semibold uppercase tracking-[0.15em]",Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Heading } from "@/components/ui/heading"; <Heading />| Prop | Type | Description |
|---|---|---|
| level | 1 | 2 | 3 | 4 | 5 | 6 | Configures level. (Default: 1) |
| size | "lg" | "md" | "sm" | Component size preset. |
| eyebrow | string | Configures eyebrow. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |
| children | React.ReactNode | Child elements rendered inside the component. |