Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input OTP
- Input Group
- Item
- Kbd
- Label
- Marker
- Menubar
- Message
- Message Scroller
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
- New Component
Elements
Charts
Icons
Heads up!
You can add components to your app using the CLI.
import { Terminal } from "lucide-react";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
export const AlertDemo = () => (
<Alert className="w-full max-w-sm">
<Terminal className="size-4" />
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>You can add components to your app using the CLI.</AlertDescription>
</Alert>
);Variants
Default
Used for informational or neutral messages.
Information
Your session will expire in 30 minutes.
Destructive
Used for errors, warnings, or irreversible actions.
Error
Your session has expired. Please log in again.
Without Icon
The layout adapts when no icon is provided — content spans the full width.
Note
This component copies code directly into your project.
Deployment failed
Check the build logs for more details.
Description Only
AlertTitle is optional — use description alone for short inline messages.
Changes saved successfully.
Props
Alert
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "destructive" | "default" | Visual style of the alert |
className | string | — | Additional CSS classes |
AlertTitle
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes |
AlertDescription
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes |
Usage
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { CircleAlert, Info } from "lucide-react";
// Default
<Alert>
<Info className="size-4" />
<AlertTitle>Information</AlertTitle>
<AlertDescription>Your session expires in 30 minutes.</AlertDescription>
</Alert>
// Destructive
<Alert variant="destructive">
<CircleAlert className="size-4" />
<AlertTitle>Error</AlertTitle>
<AlertDescription>Something went wrong. Please try again.</AlertDescription>
</Alert>
// Without title
<Alert>
<AlertDescription>Changes saved successfully.</AlertDescription>
</Alert>Specs
# Mint — Alert Specs
## Component
- name: alert
- file: registry/mint/alert.tsx
- installs to: components/ui/alert.tsx
- dependencies: class-variance-authority
## What is it
A static, non-interactive callout for surfacing important information to users.
Use it for form errors, system status, confirmations, and warnings. Not to be
confused with a Toast (transient) or Dialog (requires action) — Alert is
persistent and inline within the page flow.
## Visual identity
Minimal and contained. Generously rounded corners (Mint's 1.25rem radius), a
soft glassy border, and card background give it a subtle frame without visual
weight. The icon anchors the content and communicates intent at a glance.
Destructive variant uses --destructive for text and icon while keeping the
same card background — restrained, not alarming.
## Design tokens
--card: oklch(1 0 0) — alert background
--card-foreground: oklch(0.145 0 0) — default text
--destructive: oklch(0.55 0.25 15) — destructive text and icon
--border: oklch(0.88 0.04 155 / 60%) — alert border
--muted-foreground: oklch(0.52 0.06 155) — description text
--radius: 1.25rem — rounded-lg
## Dark theme
--card: oklch(0.205 0 0)
--card-foreground: oklch(0.985 0 0)
--border: oklch(0.32 0.05 155 / 40%)
--muted-foreground: oklch(0.6 0.06 155)
## shadcn config (components.json)
- style: new-york
- rsc: true
- tsx: true
- baseColor: neutral
- cssVariables: true
- iconLibrary: lucide
- aliases:
- components → @/components
- ui → @/components/ui
- utils → @/lib/utils
- lib → @/lib
- hooks → @/hooks
## Variants
- default → card background, foreground text. Neutral info, tip, or notice.
- destructive → destructive-colored text and icon. Errors and warnings only.
## Layout
- Uses CSS grid: icon column (16px) + content column (1fr)
- has-[>svg] selector activates the icon column automatically
- Without icon: grid-cols-[0_1fr] — icon column collapses, content fills width
- SVG icons: size-4 (16px), translate-y-0.5 for optical alignment with title
## States
- No interactive states — Alert is a static display component
- role="alert" for screen readers
## Conventions
- Use for persistent, inline messages — not for transient feedback (use Toast)
- AlertTitle is optional — skip it for single-line confirmation messages
- Always pair destructive variant with a descriptive message, not just a title
- Icon size must be size-4 — do not override, grid alignment depends on it
- Avoid using Alert inside a Dialog — use the Dialog description insteadInstallation
$ npx shadcn add \https://gin-design.vercel.app/alert