X Enterprises
Modal

ModalConfirm

Confirmation dialog with danger/warning/info variants, confirm and cancel actions.

Modal

The Modal category provides three composable dialog components built on top of Nuxt UI's UModal. XAModal is the general container; XAModalConfirm handles destructive action confirmations; XAModalKeyValue presents structured data in a readable format. All three support both v-model and internal open-state management, and expose open() / close() methods via defineExpose.

Components

<XAModalConfirm />

A focused confirmation dialog. The icon and button color adapt to the variant prop (danger, warning, info). Supports loading state during async confirm actions.

<XAModalConfirm
  v-model:open="showConfirm"
  title="Delete User"
  message="This action cannot be undone. The user and all associated data will be permanently deleted."
  variant="danger"
  confirm-text="Delete"
  :loading="deleting"
  @confirm="deleteUser"
  @cancel="showConfirm = false"
/>

Props

PropTypeDefaultDescription
modelValueBooleanundefinedv-model open state
openBooleanundefinedv-model:open alternative
titleString'Confirm'Dialog title
messageString''Body message text
variantString'info'Visual style: danger warning info
colorString''Alternative to variant using color names
confirmTextString'Confirm'Confirm button label
cancelTextString'Cancel'Cancel button label
iconString''Override the auto-selected variant icon
loadingBooleanfalseShow loading state on the confirm button

Events

EventPayloadDescription
confirmEmitted when the confirm button is clicked
cancelEmitted when the cancel button is clicked

AI Context

component: XAModalConfirm
package: "@xenterprises/nuxt-x-app"
category: Modal
use-when: >
  Use XAModalConfirm for destructive or irreversible actions (delete, revoke,
  deactivate) where user intent must be confirmed. Use variant="danger" for
  destructive actions. Supports loading state for async confirm handlers.
Copyright © 2026