Skip to content

@agala-labs/ui

Alert

Displays an application banner for contextual status, warnings, and recoverable issues.

Examples

Default

A previous register is still open

The August 28, 2026 session must be closed before opening today’s register.
<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

PropTypeDefaultDescription
variant'info' | 'success' | 'warning' | 'danger''info'Semantic status carried by the icon.
titlestring—Optional heading.
role'alert' | 'status' | 'region''status'Announcement semantics. Use alert only for urgent dynamic messages.
dismissiblebooleanfalseShows a close action.
flatbooleanfalseRemoves the surface, border, radius, and shadow.
iconstring | false—Overrides or hides the icon.
dismissLabelstring'Dismiss notification'Accessible label for the close action.
ariaLabelstring—Accessible name when the selected role needs one.
classstring—Consumer override class.

Events

  • dismiss — emitted after the user dismisses the banner

Slots

  • default — supporting message
  • action — 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.

Released under the MIT License.