Componentfeedback0.43 KB gzipZero dependencies

Alert

Notice box with tone bar and status eyebrow.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add alert

Or install the full npm package:

npm install bigbullui

Usage

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 helper

Zero 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 />
PropTypeDescription
toneToneStamp bar color and eyebrow (default info).
titlestringOptional bold title line.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.
childrenReact.ReactNodeChild elements rendered inside the component.