Controlled dialog overlay. Driven by the open prop via the native
<dialog> element and the modal enhancer, which adds a focus trap, body
scroll-lock, and a background inert barrier. Compose with <ModalHeader>,
<ModalBody>, and <ModalFooter>. Wire onOpenChange so Escape and
backdrop clicks can update your state.
<Modalopen={open}onOpenChange={setOpen}> <ModalHeader>Confirm</ModalHeader> <ModalBody>Are you sure?</ModalBody> <ModalFooter><ButtononClick={() =>setOpen(false)}>Close</Button></ModalFooter> </Modal>
Controlled dialog overlay. Driven by the
openprop via the native<dialog>element and the modal enhancer, which adds a focus trap, body scroll-lock, and a backgroundinertbarrier. Compose with<ModalHeader>,<ModalBody>, and<ModalFooter>. WireonOpenChangeso Escape and backdrop clicks can update your state.