Interface FocusValue

A value returned from the useFocus hook.

interface FocusValue {
    focusProps: DOMAttributes<HTMLElement>;
    isFocused: boolean;
    isFocusVisible: boolean;
}

Properties

focusProps: DOMAttributes<HTMLElement>

Props of an element for which focus is tracked.

An object which identity never changes between renders.

isFocused: boolean

true if an element is currently focused.

isFocusVisible: boolean

true if an element is currently focused and focus should be visible.