baseframe-js
Version:
Baseframe JS is a comprehensive suite of modular plugins and utilities designed for front-end development
12 lines (11 loc) • 421 B
TypeScript
import { type BaseElem, type SelectorRoot } from 'base-elem-js';
interface ITrapFocusProps {
focusFirst?: boolean;
nameSpace?: string;
focusable?: ('button' | 'a' | 'input' | 'select' | 'textarea' | '[tabindex]')[];
}
export interface ITrapFocusRemove {
remove: () => void;
}
declare const focusTrap: (elem: SelectorRoot | BaseElem, props?: ITrapFocusProps) => ITrapFocusRemove;
export default focusTrap;