Modal · overlay

ESC, backdrop click, and ✕ all close it; body scroll locks while open.

Usage

JavaScript
import { signal } from "./index.js";import { Modal } from "./components/modal.js"; const open = signal(false); // ESC, backdrop, and ✕ all close it; body scroll locks and Tab is trapped inside.Modal({  open,  title: "Subscribe",  children: html`<p>Dialog body…</p>`,  footer: html`${Button({ label: "Confirm", onClick: () => open.set(false) })}`,})