Componentfeedback0.43 KB gzipZero dependencies
Alert
Notice box with tone bar and status eyebrow.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add alertOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { Alert } from "@/components/ui/alert"; <Alert tone="accent" title="Limited seats">Only a few stubs left.</Alert>Source code
alert.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxalert.tsx37 lines
import * as React from "react";import { cn } from "./lib/utils"; type Tone = "info" | "accent" | "destructive"; export type AlertProps = { tone?: Tone; title?: string; className?: string; children: React.ReactNode;} & Omit<React.HTMLAttributes<HTMLElement>, "title">; const bars: Record<Tone, string> = { info: "bg-foreground", accent: "bg-accent", destructive: "bg-destructive",}; Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { Alert } from "@/components/ui/alert"; <Alert />| Prop | Type | Description |
|---|---|---|
| tone | Tone | Stamp bar color and eyebrow (default info). |
| title | string | Optional bold title line. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |
| children | React.ReactNode | Child elements rendered inside the component. |