Root state manager. Owns open state and exposes openDialog() / closeDialog() / toggle().
DialogTrigger
<button> that opens the dialog. Sets aria-haspopup="dialog", aria-expanded, and data-open.
DialogContent
Renders into a Portal with a sibling backdrop <div data-morphos-backdrop>. Sets role="dialog" and aria-modal="true". Applies focus trap and scroll lock while open.
DialogTitle
Renders as <h2> by default (configurable via as). Pair its id with aria-labelledby on DialogContent.
DialogDescription
Renders as <p>. Pair its id with aria-describedby on DialogContent.
Always provide either aria-label or aria-labelledby on DialogContent. Point
aria-labelledby at the id of your DialogTitle for best accessibility.
DialogContent calls trapFocus() and lockScroll() from @morphos/core when it mounts
while open (and again whenever the dialog's open state changes). Focus cycles through the
focusable elements inside the content element, and the page scroll lock is released
automatically when the dialog closes or DialogContent unmounts.