use-focus-within
Detects if any element within the given element has focus
Source
Docs
Package
Usage
use-focus-within
hook detects if any element within the other element has focus.
It works the same way as :focus-within
CSS selector:
One of elements has focus: false
Definition
Exported types
UseFocusWithinOptions
and UseFocusWithinReturnValue
types are exported from @mantine/hooks
package,
you can import them in your application: