autoFocus
Description
If true, the first focusable element within the children will auto-focused once FocusLock mounts.
Type
booleanDefault
falseLeave Yamada UI a star
StarFocusLock is a component that improves accessibility by restricting focus within elements such as modals and dialogs, and locking the focus within that range.
Description
If true, the first focusable element within the children will auto-focused once FocusLock mounts.
Type
booleanDefault
falseDescription
The ref of the wrapper for which the focus-lock wraps.
Type
RefObject<HTMLElement>Description
If true, focus trapping will be disabled.
Type
booleanDefault
falseDescription
ref of the element to return focus to when FocusLock unmounts.
Type
RefObject<FocusableElement>Description
ref of the element to receive focus initially.
Type
RefObject<FocusableElement>Description
If true, focus trapping will be disabled.
Deprecated
Use disabled instead.
Type
booleanDefault
falseDescription
Enables aggressive focus capturing within iframes.
- If true: keep focus in the lock, no matter where lock is active.
- If false: allows focus to move outside of iframe.
Type
booleanDefault
falseDescription
If true, disables text selections inside, and outside focus lock.
Type
booleanDefault
falseDescription
If true, focus will be restored to the element that triggered the FocusLock once it unmounts.
Type
booleanDefault
falseEdit this page on GitHub