Skip to content

@agala-labs/ui

Modal

Presents a blocking decision either declaratively or through the modal manager.

Examples

Default
<AgalaModal v-model:open="open" title="Archive record">Confirm the action.</AgalaModal>

Import

import { AgalaModal, AgalaModalProvider, modalManager } from '@agala-labs/ui'

API

PropTypeDefaultDescription
openbooleanVisibility used by v-model:open.
titlestringDialog heading.
size'sm' | 'md' | 'lg' | 'xl' | 'full''md'Dialog width.
dismissiblebooleantrueAllows outside-click dismissal.
escapeClosesbooleantrueAllows Escape dismissal.
hideHeaderbooleanfalseHides the built-in header.

Events

  • update:open(value: boolean)
  • close
  • after-leave

Slots

  • default
  • footer — receives { close }

Accessibility

Traps focus while present, retains background scroll lock through leave, and restores the opener after exit. Mount exactly one ModalProvider when using modalManager. Reduced motion removes meaningful transform travel.

Released under the MIT License.