useFocusWithin
⟦Tráçk fóçúš éñtéríñg/léávíñg á šúbtréé.~~~~~~~~~~~~~~⟧
Signature
useFocusWithin(props?): resultParameters
| Name | Type | Description |
|---|---|---|
onFocusWithinChange | (focused: boolean) => void | Optional callback when focus enters or leaves. |
Returns
{ isFocusWithin, focusWithinProps } — spread focusWithinProps onto the root element.
SSR notes
Client-only (DOM focus events). Returns false on first server render.
Import
import { useFocusWithin } from "@gunkin/uiify/hooks";