Alert
A compact banner-style message with optional icon, action, and dismissal controls.
A compact banner-style message with optional icon, action, and dismissal controls.
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Import
Section titled “Import”import { Alert } from "@zentara-co/zenos-ui";Custom icons
Section titled “Custom icons”Pass a custom icon on Alert.Root for a shared leading icon, or on Alert.Icon with the icon prop (or children) to override it locally. Set showDefault={false} on Alert.Icon to omit the variant default on status alerts. Built-in status icons are exported as AlertInfoIcon, AlertCheckCircleIcon, AlertWarningIcon, and AlertErrorIcon.
Scheduled maintenance
Workspace sync pauses tonight from 11 PM to 1 AM.
Product launch week
Pin the launch checklist to your team home page.
Actions and dismissal
Section titled “Actions and dismissal”Alert.Title and Alert.Description use body medium and body regular at the body-m scale. Long copy truncates with an ellipsis. Alert.Action adds a related action. Alert.Close provides the dismiss control while the consumer remains responsible for removing the static alert. Both controls automatically match the semantic color of Alert.Root.
Import running
Your workspace data is still being processed.
Variants
Section titled “Variants”Neutral variants suit general and inverse announcements. Status variants use information and accent subtle banner surfaces for success, info, warning, and error. Leading icons appear on status variants only. Action and close controls inherit the alert tone.
Neutral
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Status
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Lorem ipsum here
Content text here zipzipzipzipzipzipblebleblebleblebleble
Alert.Root Alert.Content Alert.Icon Alert.Body Alert.Title Alert.Description Alert.Action Alert.Close
API
| Prop | Type | Default | Description |
|---|---|---|---|
Root.variant | AlertVariant | default | Semantic visual tone; error also defaults to role=alert. |
Root.icon | ReactNode | — | Custom leading icon for Alert.Icon when it has no local override. |
Icon.icon | ReactNode | — | Custom icon node; overrides Root.icon and the variant default. |
Icon.showDefault | boolean | true | Renders the variant default when no custom icon is provided. |
Action.variant | ButtonVariant | ghost | Button treatment; its color follows Root.variant. |
Close.label | string | Dismiss | Accessible name for the dismiss control. |
role | AriaRole | — | Overrides the status or alert role. |
native props | React.HTMLAttributes<HTMLDivElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”Alert uses role="status" by default and role="alert" for the error variant. Use concise titles, keep action labels meaningful, and avoid placing essential information only in the icon or color.