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
openboolean—Visibility used by v-model:open.
titlestring—Dialog heading.
size'sm' | 'md' | 'lg' | 'xl' | 'full''md'Dialog width.
dismissiblebooleantrueAllows outside-click dismissal.
escapeClosesbooleantrueAllows Escape dismissal.
hideHeaderbooleanfalseHides the built-in header.
classstring—Consumer class applied to the dialog surface.
contentClassstring—Additional consumer class applied to the dialog surface.
overlayClassstring—Consumer class applied to the teleported overlay.

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.