Alert
Glow Alert
An inline alert banner with a soft glow on its leading edge and an animated enter and exit.
npx motionsnack add glow-alertCustomize
<GlowAlert />Props
26 properties
| Property | Type | Default | Description |
|---|---|---|---|
| action | { label: string; href?: string } | { label: 'View changes', href: '' } | First action, a 36 secondary button. With an href it is a link. An empty label hides it. |
| onAction | () => void | - | Called when the first action is pressed. |
| secondaryAction | { label: string; href?: string } | { label: '', href: '' } | Second action, a 36 ghost button. An empty label hides it. |
| onSecondaryAction | () => void | - | Called when the second action is pressed. |
| open | boolean | - | Visibility. With a value the component is controlled. |
| defaultOpen | boolean | true | Visibility at the start when uncontrolled. |
| onOpenChange | (open: boolean) => void | - | Called with false when the alert is dismissed (true when restored). |
| statusLabels | Record<'info' | 'success' | 'warning' | 'error', string> | English | Screen-reader prefix per variant, read before the title. |
| text | string | - | Deprecated alias of description. |
| accent | string | - | Deprecated, ignored: info is neutral. |
| glow | boolean | - | Deprecated, ignored: alerts have no glow. |
| glowStrength | number | - | Deprecated, ignored. |
| radius | number | - | Deprecated, ignored: alerts are radius 12. |
| duration | number | - | Deprecated, ignored: list insert 300ms, removal 180ms. |
| bounce | number | - | Deprecated, ignored. |
| className | string | '' | Extra classes on the root. |
| variant | 'info' | 'success' | 'warning' | 'error' | 'info' | Meaning of the alert: sets the icon and the surface. Info is neutral. |
| title | string | 'A new version is available' | Small surface title. An empty string hides it. |
| description | string | 'Version 2.4 brings faster builds and a redesigned editor. Reload to update.' | Body text. An empty string hides it. |
| showIcon | boolean | true | Status icon in front of the text. |
| dismissible | boolean | false | Show the dismiss button. |
| dismissLabel | string | 'Dismiss alert' | Accessible name of the dismiss button. |
| restoreLabel | string | '' | Text of a button that brings a dismissed alert back. Empty leaves nothing behind. |
| successColor | string | '' | Success colour on both themes. Empty uses the per-theme pair. |
| warningColor | string | '' | Warning colour on both themes. Empty uses the per-theme pair. |
| errorColor | string | '' | Error colour on both themes. Empty uses the per-theme pair. |
About Glow Alert
Glow Alert is an inline banner with an icon, a title, supporting text, an optional action and a dismiss button. It comes in info, success, warning and error variants, each with its own icon and tint, and the info variant follows the accent colour. A thin lit bar and a soft radial light sit on the leading edge and breathe slowly, giving the glass surface a hint of colour without painting the whole banner. The alert springs in from a slight blur and scale, the icon pops in a beat later, and on dismiss it fades and shrinks away. A small restore button can take its place so the alert can be brought back, and the visibility can be controlled from outside.
What's included
- Info, success, warning and error variants with their own icons
- Tint colour prop per variant, info uses the accent
- Breathing glow on the leading edge with adjustable strength
- Spring enter and quick fade exit
- Optional action as a link or a button
- Dismiss button, optional restore button, controlled or uncontrolled
- Alert or status role by variant, reduced-motion fallback
- Type
- Animated React alert component
- Library
- Components · Alert
- Stack
- Next.js, React, Tailwind CSS
- Added
- 2026-09-20