autoFocus
Description
If true
, the first focusable element within the children
will auto-focused once FocusLock
mounts.
Type
boolean
Default
false
Leave 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
boolean
Default
false
Description
The ref
of the wrapper for which the focus-lock wraps.
Type
RefObject<HTMLElement>
Description
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.
Type
boolean
Default
false
Description
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
boolean
Default
false
Description
If true
, disables text selections inside, and outside focus lock.
Type
boolean
Default
false
Description
If true
, focus will be restored to the element that triggered the FocusLock
once it unmounts.
Type
boolean
Default
false
Edit this page on GitHub