- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Desktop Window
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Frame
- Heading
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Live Waveform
- Marker
- Menubar
- Message
- Message Scroller
- Meter
- Meter Ring
- Native Select
- Navigation Menu
- NumberCount
- Pagination
- Popover
- Progress
- Progress Ring
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Timeline
- Toast
- Toggle
- Toggle Group
- Tooltip
import { IconCircleCheck, IconInfoCircle } from "@tabler/icons-react"
import {Installation#
bunx --bun shadcn@latest add @ondo-ui/alert
Usage#
import {
Alert,
AlertAction,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"<Alert>
<InfoIcon />
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components and dependencies to your app using the cli.
</AlertDescription>
<AlertAction>
<Button variant="outline">Enable</Button>
</AlertAction>
</Alert>Composition#
Use the following composition to build an Alert:
Alert
├── Icon
├── AlertTitle
├── AlertDescription
└── AlertActionExamples#
Basic#
A basic alert with an icon, title and description.
import { IconCircleCheck } from "@tabler/icons-react"
import {Primary#
Use variant="primary" to create a primary alert.
import { IconSparkles } from "@tabler/icons-react"
import {Info#
Use variant="info" to create an informational alert.
import { IconInfoCircle } from "@tabler/icons-react"
import {Success#
Use variant="success" to create a success alert.
import { IconCircleCheck } from "@tabler/icons-react"
import {Warning#
Use variant="warning" to create a warning alert.
import { IconAlertTriangle } from "@tabler/icons-react"
import {Destructive#
Use variant="destructive" to create a destructive alert.
import { IconAlertCircle } from "@tabler/icons-react"
import {Action#
Use AlertAction to add a button or other action element to the alert.
import {
Alert,
AlertAction as AlertActionElement,Custom Colors#
You can customize the alert colors by adding custom classes such as bg-amber-50 dark:bg-amber-950 to the Alert component.
import { IconAlertTriangle } from "@tabler/icons-react"
import {API reference#
Alert#
The Alert component displays a callout for user attention.
| Prop | Type | Default |
|---|---|---|
variant | "default" | "primary" | "info" | "success" | "warning" | "destructive" | "default" |
AlertTitle#
The AlertTitle component displays the title of the alert.
| Prop | Type | Default |
|---|---|---|
className | string | - |
AlertDescription#
The AlertDescription component displays the description or content of the alert.
| Prop | Type | Default |
|---|---|---|
className | string | - |
AlertAction#
The AlertAction component displays an action element (like a button) positioned absolutely in the top-right corner of the alert.
| Prop | Type | Default |
|---|---|---|
className | string | - |