Alert
Live example
Alert
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/alert.jsonAPI reference
These are the main Alert options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
tone | default | info | success | warning | destructive | default |
role | alert | status (optional) | — |
className | string on every part | — |
Tones
Use text to describe the outcome as well as color. Static notices do not announce themselves. For a newly inserted urgent error, explicitly set role="alert"; use role="status" for a non-urgent update.
Live example