DialogConfirmation
Opinionated dialog with built-in Validate / Cancel footer buttons and a read-to-enable guard — the Validate button is only enabled once the user has scrolled to the bottom of the content (isRead pattern).
Structure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-dialog-confirmation> — wraps OrigamDialog with 4 zones: ① overlay scrim, ② header (status icon + title), ③ scrollable content + isRead sentinel, ④ two-button footer (Cancel / Validate).- 1.origam-overlay (scrim)
- Full-viewport overlay inherited from OrigamDialog. Handles click-outside and Escape (unless persistent=true).
- 2.origam-card (header)
- Card header with status icon in prepend slot, title, and close button in append slot. All header-* slots are forwarded transparently.
- 3.origam-card__content
- Scrollable content body. An IntersectionObserver sentinel at the bottom fires the @isRead event when it enters the viewport, enabling the Validate button.
- 4.origam-card__footer (two-button bar)
- Default footer with Cancel (left) and Validate (right) in a space-between row. The Validate button is disabled until isRead=true. Override with the #footer slot.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- cancellablebooleantrue
- When true (default), a Cancel button is rendered in the footer alongside Validate. Set to false for non-cancellable flows.
- cancelTextKeystring
- validateTextKeystring
- fullscreenbooleanfalse
- Expands the dialog to cover the full viewport.
- retainFocusboolean
- Controls the dialog width (xs: 320px … xl: 1080px) via size tokens.
- closeLabelstring
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- scrollablebooleanfalse
- Enables vertical scrolling inside the dialog body while header and footer remain fixed. Required for the isRead pattern to work correctly (the sentinel must be at the bottom of a scrollable area).
- absoluteboolean
- closeOnBackboolean
- contentClassstring | Array<string>
- contentPropsany
- disabledbooleanfalse
- Disables the activator and prevents the dialog from opening.
- noClickAnimationboolean
- modelValueboolean
- v-model binding for the dialog open/close state.
- zIndexnumber | string
- disableGlobalStackboolean
- persistentbooleanfalse
- Prevents closing via Escape or outside-click. Recommended for critical confirmation flows.
- heightnumber | string
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- target'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance | [x: number, y: number] | undefined
- activator'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance
- activatorPropsany
- openOnClickboolean
- openOnContextMenuboolean
- openOnHoverboolean
- openOnFocusboolean
- closeOnContentClickboolean
- closeDelaynumber | string
- openDelaynumber | string
- locationStrategyTLocationStrategy | TLocationStrategyFn
- locationTAnchor
- originTAnchor | 'auto' | 'overlap'
- offsetnumber | string | Array<number>
- viewportMarginnumber
- scrollStrategyTScrollStrategy | TScrollStrategyFn
- containedboolean
- eagerboolean
- transitionboolean | string | TTransitionProps
- scrimboolean | string
- attachboolean | string | Element | null
- contentDisplayTCardContentDisplay
- flatboolean
- imagestring
- linkboolean
- subtitlestring | number
- Subtitle rendered below the title in the dialog header.
- textstring | number
- Body text forwarded to the inner dialog card text slot.
- titlestring | number
- Dialog title forwarded to the inner OrigamDialog header.
- typeTCardType
- titleIdstring
- tagstring
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- color
- Intent or custom colour forwarded to the inner OrigamDialog.
- bgColorTColor
- densityTDensity
- elevationTElevation
- loadingTLoadingValue
- loadingTextstring
- positionTPosition
- topnumber | string
- bottomnumber | string
- leftnumber | string
- rightnumber | string
- roundedboolean | number | string | TRounded | null | undefined
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- hrefstring
- replaceboolean
- toRouteLocationRaw
- exactboolean
- rippleboolean | { class: string }
- appendAvatarstring
- appendIconTIcon
- prependAvatarstring
- prependIconTIcon
- prependAriaLabelstring
- appendAriaLabelstring
- activeboolean | IStateEffectConfig
- activeClassstring
- hoverboolean | IStateEffectConfig
- hoverClassstring
- status
- Semantic status (success, warning, danger, info). Resolves the header prepend icon and applies a status CSS class.
- statusIconPositionTStatusPosition
- icon
- Custom icon in the dialog header prepend slot. Overrides the status icon when both are set.
API
Slots
Emplacements de contenu exposés par ce composant.
- #default
- Replaces the entire dialog body (including the default card layout).
- #header-title
- Custom title content.
- #footer
- Overrides the default Cancel / Validate footer layout with custom content.
- #header
- Replaces the entire card header with custom content.
- #text
- Body text forwarded to the inner card text slot.
- #content
- Main dialog content. The isRead IntersectionObserver sentinel is appended after this slot — scroll to the bottom to enable the Validate button.
- #loader
- Custom loading indicator forwarded to the inner OrigamDialog loader slot.
- #activator
- Element that triggers the dialog. Bind the provided props to wire aria-haspopup="dialog", aria-expanded and the click handler.
- #header-append
- Content after the title row (defaults to close icon).
- #header-prepend
- Content before the title. By default renders the status/icon.
- #header-subtitle
- Custom subtitle below the title in the header.
- #header-content
- Extra content area inside the header.
- #asset
- Visual asset rendered above the body text.
API
Emits
Événements émis par ce composant.
- @validateMouseEvent
- Fired when the user clicks the Validate button (only possible after isRead=true). The dialog closes automatically.
- @cancelMouseEvent
- Fired when the user clicks the Cancel button. The dialog closes automatically.
- @update:modelValueany
- Fired when the dialog open/close state changes.
API
Membres exposés
Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.
- <T extends object>(props: T, exclude?: string[]) => Partial<T>
- Utility to forward a filtered subset of props to the inner OrigamDialog.
Personnalisation
Variables CSS
Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.
- Size of the status icon in the header prepend slot.
- Icon colour when no status is set.
- Icon colour when status="success".
- Icon colour when status="warning".
- Icon colour when status="danger".
- Icon colour when status="info".
- Title font size.
- Title font weight.
- Gap between footer action buttons.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Rôles ARIA
Interactions clavier
| Touche | Action |
|---|---|
| Escape | Closes the dialog (unless persistent=true). |
| Tab | Cycles focus through Cancel, Validate and any other focusable elements inside the dialog (focus trap inherited from OrigamDialog). |
| Shift+Tab | Cycles focus backwards. |
Notes
- The Validate button is rendered with disabled=true and aria-disabled until the user scrolls to the bottom of the content (isRead=true). This is intentional — it enforces that users read critical content before confirming.
- role="dialog" and aria-modal="true" are applied by the inner OrigamDialog on the card element. The title is linked via aria-labelledby.
- On open, focus moves to the overlay content. On close, focus returns to the activator element.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Basic confirmation dialog
Read-to-enable (terms of service)
Non-cancellable confirmation
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.