/** * Returns a ref to attach to a container. While `active` is `true`: * - Initial focus moves to the first focusable child (or the container itself * if it has `tabindex`). * - Tab and Shift+Tab cycle within the container. * - On deactivate, focus is restored to whatever was focused before. * * @param active - Whether the trap is engaged. * @returns A ref callback to attach to the container element. * * @example * const trapRef = useFocusTrap(open); *
*/ export declare function useFocusTrap(active: boolean): (node: T | null) => void;