Alert
A message that stays on the page, with a tone, optional actions and a choice of how urgently screen readers hear it.
- Use it for
- A persistent message about the page or form, with a tone and an action.
- Not for
- Brief confirmations that should go away. Try Toast or EmptyState.
Alert preview
Loading example…
Installation
npm install @stackunseen/uiimport { Alert } from '@stackunseen/ui';@stackunseen/ui/styles.cssUsage and props
The color only supports what the words say. A message already on the page isn’t announced; use status or alert only for messages that appear later.
Supported inputs
This is the public signature used by this example. Open Code to see how the values and callbacks fit together.
tone?: neutral | info | success | warning | danger · icon? · native div props · Title/Description/ActionsAll props
Loading…
For your coding agent
Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.
- Contract
- tone?: neutral | info | success | warning | danger · icon? · native div props · Title/Description/Actions
- Keeps honest
- The color only supports what the words say. A message already on the page isn’t announced; use status or alert only for messages that appear later.
- MCP
read_component "Alert"on the docs endpoint
Keyboard and customization
Keyboard
The message is read in document order. Only nested actions enter the tab sequence.
Customization
Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio