Alert: Actions
Put buttons in <AlertAction />. They align with the first line of the title, even when it wraps.
A new version of the dashboard is available with faster charts, saved filters and a redesigned sidebar
Reloading keeps your current filters.
Message archived
This adds the example as components/examples/alert/actions.tsx, together with the Alert component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/alert-actions.jsonTo add only the component, follow the Alert installation.
Props in this example
The Alert props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
variantColors the icon. destructive and warning are announced assertively. | "default" | "destructive" | "success" | "info" | "warning" | "default" |
Every prop is in the Alert API reference.
- Variants
- Soft
- Partial content
- Dismissible
- Controlled
- Cancel a dismiss
- Inserted after load
- Rich content
- Right to left
See them all, with keyboard support and accessibility notes, on the Alert page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- EmptyA placeholder for screens with nothing to show yet, with an icon, a message and the next action.
- ProgressA bar or ring that shows how far a task has come, eases between updates and slides while the total is unknown.
- SkeletonPlaceholders that wait 150ms before showing, take the exact size of the content they wrap, and fade it in without moving anything.
- SpinnerA loading indicator with Apple-style ticks or a breathing ring that can wait before showing and stay long enough not to flicker.