ENGLISH·COURSE API
    Preparing search index...
    • shadcn/ui Dialog root — the state machine behind a modal.

      Controls whether the dialog is open, either uncontrolled (via DialogTrigger) or controlled through open / onOpenChange. Renders no DOM of its own.

      Parameters

      • __namedParameters: DialogProps

      Returns Element

      Built on the radix-ui unified package already used by Button, so the whole tree ships without a per-primitive dependency. Radix supplies the behaviour this project must not re-implement: focus trap and restore, scroll lock, aria-hidden on background content, and dismissal on Escape or an outside click.

      Note that Radix enforces modality by hiding the rest of the document from assistive technology, not by setting aria-modal — that attribute is absent by design, and asserting on it would be asserting on the weaker of the two techniques.

      Modals in this project are opened imperatively through @ebay/nice-modal-react rather than by conditionally rendering a Dialog as a child — see AGENTS.md §Modals.

      const modal = useModal();

      <Dialog open={modal.visible} onOpenChange={modal.hide}>
      <DialogContent>…</DialogContent>
      </Dialog>