Binhlaig UI Component
Alert
A clear message block for status updates, notices, warnings and errors.
Installation
Install Alert in your project.
Terminal
npx binhlaig-ui@latest add alertFor project setup, installer selection, dependencies, and advanced installation instructions, see the Installation Guide.
View Installation Guide →Update or Overwrite →Import
Import Alert primitives from your UI directory.
import {
Alert,
AlertActions,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"Usage
Use AlertTitle and AlertDescription to structure a message.
Heads up
You can add components using the Binhlaig UI CLI.
Variants
Choose a semantic style that matches the message.
Information
A new update is available.
Success
Your changes were saved.
Warning
Review these settings before continuing.
Error
Something went wrong.
With Icon
Place an icon before the title for faster visual recognition.
New feature
Drawer is now available in the component registry.
With Actions
Add relevant actions without turning the alert into a modal.
Unsaved changes
Save your changes before leaving this page.
API Reference
Main components and variants available in Binhlaig UI Alert.
| Component | Purpose |
|---|---|
Alert | The semantic message container. |
AlertTitle | A concise message heading. |
AlertDescription | Supporting message content. |
AlertActions | Optional related actions. |
| Prop | Values | Default |
|---|---|---|
variant | default, info, success, warning, destructive | default |
role | Any valid ARIA role | alert |