Skip to content

useIndicatorFocusRing

@astryxdesign/core v0.7.1 · useIndicatorFocusRing

Parameters ​

NameTypeDefaultDescription
containerRefRef<HTMLElement | null>—Ref to an element wrapping only the indicator, so its single element child is unambiguously the thing to ring. Required.
isDisabledboolean | MaybeRefOrGetter<boolean>falseSkip the ring; a disabled control is not focusable.

Returns ​

NameTypeDescription
focusProps{ onFocus: (event: FocusEvent) => void, onBlur: () => void }Bind on the element that owns the focusable input: onFocus to @focusin, onBlur to @focusout.