Copy to clipboard
Heads up!
You can add components to your app using the CLI.
Installation
Copy to clipboard
npx bearnie add alert
npx bearnie add alert
bunx bearnie add alert
bunx bearnie add alert
pnpm dlx bearnie add alert
pnpm dlx bearnie add alert
yarn dlx bearnie add alert
yarn dlx bearnie add alert
Copy to clipboard
import Alert from "@/components/ui/alert/Alert.astro";
import AlertTitle from "@/components/ui/alert/AlertTitle.astro";
import AlertDescription from "@/components/ui/alert/AlertDescription.astro";
Usage
import {
Alert,
AlertTitle,
AlertDescription,
} from "@/components/ui/alert"
<Alert>
<AlertTitle>Heads up!</AlertTitle>
<AlertDescription>
You can add components to your app using the CLI.
</AlertDescription>
</Alert>
Examples
Destructive
Copy to clipboard
Error
Your session has expired. Please log in again.
Success
Copy to clipboard
Success
Your changes have been saved successfully.
Warning
Copy to clipboard
Warning
Your account is about to expire.
Info
Copy to clipboard
Info
A new version is available for download.
Anatomy
Alert- The root container with variant stylingAlertTitle- The heading textAlertDescription- The descriptive content
Props
Alert
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | default | destructive | success | warning | info | default | Visual style variant |
| class | string | - | Additional CSS classes |
AlertTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | - | Additional CSS classes |
AlertDescription
| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | - | Additional CSS classes |