useFocusWithin
functionSource L7Open-code aq-ui React hook for Use Focus Within.
function useFocusWithin<T extends Element>(target: Target<T>, enabled = true): boolean- Returns
boolean
Parameters
| Name | Type | Default |
|---|---|---|
target | Target<T> | — |
enabled? | — | true |
Open-code aq-ui React hook for Use Focus Within.
pnpm dlx aq-ui@alpha add use-focus-withinImport the parts you need, then jump to an export for its contract.
"use client"
import { useFocusWithin } from "@/hooks/use-focus-within"Open-code aq-ui React hook for Use Focus Within.
function useFocusWithin<T extends Element>(target: Target<T>, enabled = true): booleanboolean| Name | Type | Default |
|---|---|---|
target | Target<T> | — |
enabled? | — | true |
hook-target