Alert: Inserted after load
Alerts that mount after the page has loaded fade and slide in, and screen readers announce them. Alerts already in the server HTML appear without motion.
This adds the example as components/examples/alert/inserted.tsx, together with the Alert component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/alert-inserted.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" |
onOpenChangeCalled when the close button is pressed. | (open: boolean) => void | – |
Every prop is in the Alert API reference.
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.