Alert
Display important messages and notifications to users with optional icons and semantic variants.
Install Dependencies
npx quickcode-ui add AlertExamples
Default Example
Achievement unlocked!
You've just completed your first task streak. Keep up the momentum and collect more badges.
New update available! Please refresh the page to get the latest
Connection lost
Your device is not connected to the server. Try the following:
- Check your Wi-Fi or mobile network
- Restart the app
- Contact support if the problem persists
Props
Alert
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "destructive" | "default" | Visual style of the alert |
className | string | — | Additional CSS classes |
children | React.ReactNode | — | Alert content including icon, title, and description |
Alert.Title
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes |
children | React.ReactNode | — | Title text content |
Alert.Description
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | — | Additional CSS classes |
children | React.ReactNode | — | Description content, supports text, paragraphs, and lists |
Last updated on