Keep the focus inside an element while it is active, cycling with Tab.
This is custom React hooks, you need to follow the Basic Rules when you use it.
Press Tab inside the box, the focus never leaves it.
const useFocusTrap = <T extends HTMLElement = HTMLElement>(
active?: boolean,
) => RefObject<T | null>