Skip to content

@agala-labs/ui

Alert

Communicates contextual status or a recoverable issue.

Examples

Default
<AgalaAlert variant="danger" title="Could not load"><template #default>Try again.</template><template #action><AgalaButton size="sm" variant="outline">Retry</AgalaButton></template></AgalaAlert>

Import

import { AgalaAlert } from '@agala-labs/ui'

API

PropTypeDefaultDescription
variant'info' | 'success' | 'warning' | 'danger''info'Semantic status.
titlestringOptional heading.
dismissiblebooleanfalseShows an internal close action.
flatbooleanfalseRemoves the neutral surface and radius.
iconstring | falseOverrides or hides the icon.
classstringConsumer override class.

Slots

  • default — alert body
  • action — recovery or follow-up control

Accessibility

Icon, content, action, and dismissal remain in DOM order. Actions wrap below narrow messages while staying keyboard reachable. Urgent messages should be announced by the consuming workflow when appropriate. Dismissal collapses and fades the alert out; the transition respects reduced motion.

Released under the MIT License.