Overview
The Modal component displays content in an overlay dialog, typically used for important interactions that require user attention. Built on Reka UI’s Dialog component.Basic Usage
Props
The title of the modal displayed in the header.
The description text displayed below the title.
Render an overlay behind the modal.
When
true, enables scrollable overlay mode where content scrolls within the overlay.Animate the modal when opening or closing.
When
true, the modal will take up the full screen.Render the modal in a portal.
Display a close button to dismiss the modal. Can be configured with button props:
{ size: 'md', color: 'neutral', variant: 'ghost' }The icon displayed in the close button. Accepts Iconify icon names.
When
false, the modal will not close when clicking outside or pressing escape.Controls the open state of the modal (v-model:open).
The default open state when uncontrolled.
The modality of the dialog. When set to
true, interaction outside the element will be disabled.Additional props passed to the dialog content element.
CSS class for styling the trigger element.
Theme customization object for component slots.
Events
Emitted when the open state changes.
Emitted after the modal leave transition completes.
Emitted after the modal enter transition completes.
Emitted when a close attempt is prevented (when
dismissible is false).Slots
The trigger element for opening the modal. Receives the current open state.
Complete control over the modal content, replacing the default structure.
Customizes the header section of the modal.
Customizes the title text.
Customizes the description text.
Additional actions displayed in the header, typically between title and close button.
Customizes the close button.
The main content area of the modal.
Footer section for actions or additional content.