Interface HeadlessButtonValue

A value returned from the useButton hook.

interface HeadlessButtonValue {
    buttonProps: ButtonHTMLAttributes<HTMLButtonElement>;
    isFocused: boolean;
    isFocusVisible: boolean;
    isHovered: boolean;
    isPressed: boolean;
}

Properties

buttonProps: ButtonHTMLAttributes<HTMLButtonElement>

Props of an element that must have a button behavior.

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.

isHovered: boolean

true if an element is currently hovered.

isPressed: boolean

true if an element is currently pressed.