Modal
A confirmation dialog that blocks the page until the user makes a choice. Scales up from center on open (250ms) and closes faster (150ms), with content staggering in after the panel lands. Renders in a portal, traps focus, and closes on Escape or backdrop click.
Installation
npx stepwise-ui add modal
Default
Left aligned
Pass align="left" to left-align the icon, title, and description, and move the actions to the trailing edge as auto-width buttons instead of a centered, evenly-split row.
Destructive
Red accent bar and confirm button. Pass loading to show a spinner while the action processes.
Props
PropTypeDescription
openbooleanControls visibility.
onClose() => voidCalled on backdrop click or Escape.
titlestringDialog heading.
descriptionstringSupporting copy below the title.
confirmLabelstringConfirm button label. Default "Confirm".
variant"default" | "destructive"Visual style. Default "default".
align"center" | "left"Content alignment. Default "center".
onConfirm() => voidCalled when the confirm button is clicked.
loadingbooleanShows a spinner in the confirm button.
childrenReactNodeOptional content between description and actions.