Interface FocusProps

Props of the useFocus hook.

interface FocusProps {
    isDisabled?: boolean;
    onBlur?: (() => void);
    onFocus?: (() => void);
    onFocusChange?: ((isFocused: boolean) => void);
    onFocusVisible?: (() => void);
}

Hierarchy (view full)

Properties

isDisabled?: boolean

If true then focus events are disabled.

false
onBlur?: (() => void)

A handler that is called when the element loses focus.

onFocus?: (() => void)

A handler that is called when the element receives focus.

onFocusChange?: ((isFocused: boolean) => void)

A handler that is called when the element's focus status changes.

Type declaration

    • (isFocused): void
    • Parameters

      • isFocused: boolean

        true if an element is focused.

      Returns void

onFocusVisible?: (() => void)

A handler that is called when the element receives focus that must be visible to a user.