A React Hook that returns the currently active element (via document.activeElement), optionally traversing the shadow DOM.
Click on the input, button below or change with tab to see the active element change.
See API for more details.
Click links below to view source on GitHub.
Element or null.
Initial value is null, and will be updated to Element when component is mounted or active element is changed.