active Whether the trap is on. Required. | boolean | — |
| React.ReactNode | — |
onEscape Called on the Escape key. The trap does not close itself. | () => void | — |
initialFocusRef Element to focus on activation, instead of the first focusable one. | RefObject<HTMLElement> | — |
returnFocusRef Element to focus on deactivation, instead of the previously focused one. | RefObject<HTMLElement> | — |
containerRef Supply the container ref when the caller also needs it. | RefObject<HTMLDivElement> | — |
autoFocus Move focus into the region when it activates. | boolean | true |
restoreFocus Return focus when it deactivates. | boolean | true |
| string | — |
| React.CSSProperties | — |