Interface HeadlessTextInputValue

A value returned from the useTextInput hook.

interface HeadlessTextInputValue {
    inputProps: InputHTMLAttributes<HTMLElement>;
    isFocused: boolean;
    isFocusVisible: boolean;
    isHovered: boolean;
    labelProps: LabelHTMLAttributes<HTMLElement>;
    value: string;
}

Properties

inputProps: InputHTMLAttributes<HTMLElement>

Props of an element that must have a text input 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.

labelProps: LabelHTMLAttributes<HTMLElement>

Props of an element that must have an input label behavior.

An object which identity never changes between renders.

value: string

An input text value.