UNPKG

@c15t/react

Version:

Developer-first CMP for React: cookie banner, consent manager, preferences centre. GDPR ready with minimal setup and rich customization

15 lines 557 B
import { type RefObject } from 'react'; /** * Hook that manages focus trapping within a container. * * @remarks * This hook ensures keyboard navigation stays within the container * while it's active, improving accessibility for modal dialogs. * * @param shouldTrap - Boolean indicating whether focus should be trapped * @param containerRef - Reference to the container element * * @public */ export declare function useFocusTrap(shouldTrap: boolean, containerRef: RefObject<HTMLElement> | null): void; //# sourceMappingURL=use-focus-trap.d.ts.map