Skip to content
kapable

Dialog

Actions · 3 exports · v0.1.0 · showcase

Native modal dialog with browser-owned focus trap, Escape, backdrop, and focus return.

Browse 72 component families

Delete deploy?

Removes deploy #4821 from the log.

This is the real open-state paint in document flow. Modal focus and dismissal run in the live playground.

Usage

Dialog usage
<Dialog id="confirm" title="Delete deploy?">Confirmation copy</Dialog>

API

Dialog API

DialogProps

Modal dialog on the native `<dialog>` element — `showModal()` gives the focus trap, Escape, backdrop, and focus-return to the opener natively; the kit owns title wiring (`aria-labelledby`), the labelled close control, and token paint. Opening needs JS (island doctrine — put the opener inside a clientEntry island and target the dialog's `id` with `onOpenDialog(id)`); once open, `<form method="dialog">` buttons close with no further wiring.

Dialog props
proptypenotes
idstringDocument-unique id — openers target it via `onOpenDialog(id)`.
titlestringDialog title; renders as the labelling heading.
children?RemixNodeBody content. Put app forms here, not in `actions`.
actions?RemixNodeFooter row. `<form method="dialog">` buttons here close natively; confirm buttons that mutate belong to app forms in the body.
width?'sm' | 'md' | 'lg'Dialog width: 'sm' 360px · 'md' 480px (default) · 'lg' 640px.
closeLabel?stringAccessible name for the × control (i18n; default 'Close').
mix?MixInput

More in Actions

More in Actions