@agala-labs/ui
Alert
Displays an application banner for contextual status, warnings, and recoverable issues.
Examples
Default
<AgalaAlert variant="warning" title="A previous register is still open">
The previous session must be closed before opening today’s register.
<template #action><AgalaButton size="sm" variant="outline">View session</AgalaButton></template>
</AgalaAlert>Import
import { AgalaAlert } from '@agala-labs/ui'API
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'info' | 'success' | 'warning' | 'danger' | 'info' | Semantic status carried by the icon. |
title | string | — | Optional heading. |
role | 'alert' | 'status' | 'region' | 'status' | Announcement semantics. Use alert only for urgent dynamic messages. |
dismissible | boolean | false | Shows a close action. |
flat | boolean | false | Removes the surface, border, radius, and shadow. |
icon | string | false | — | Overrides or hides the icon. |
dismissLabel | string | 'Dismiss notification' | Accessible label for the close action. |
ariaLabel | string | — | Accessible name when the selected role needs one. |
class | string | — | Consumer override class. |
Events
dismiss — emitted after the user dismisses the banner
Slots
default — supporting messageaction — one recovery or follow-up control
Accessibility
Status is the non-interruptive default; opt into alert only for urgent dynamic messages. Icon, content, action, and dismissal remain in DOM order. Actions wrap below narrow messages, the dismiss control is labeled, and dismissal motion respects reduced-motion preferences.