React DOM integration
Portal dialog focus
Use native modal semantics and return focus to the logical trigger on close.
Formal Syntax & Structure
react syntaxreact
<dialog onClose={() => trigger.current?.focus()} />Working Example
Example Snippetreact
<dialog onClose={() => trigger.current?.focus()} />