Guaxu Docs
    Preparing search index...

    Interface SelectProps

    Props for the Select component.

    interface SelectProps {
        children: (item: SelectOptionProps) => ReactNode;
        errorMessage?: string;
        isDisabled?: boolean;
        isInvalid?: boolean;
        isRequired?: boolean;
        label: string;
        name?: string;
        options: SelectOptionProps[];
        placeholder?: string;
        setValue: (value: Key | null) => void;
        value: Key | null;
    }
    Index

    Properties

    children: (item: SelectOptionProps) => ReactNode

    Render prop for customizing each option.

    errorMessage?: string

    Error message displayed beneath the field when invalid.

    isDisabled?: boolean

    Disables the select when true.

    false
    
    isInvalid?: boolean

    Styles the control as having an invalid value. If true, the errorMessage will be displayed beneath the field.

    isRequired?: boolean

    Marks the field as required for form validation.

    false
    
    label: string

    Label text displayed above the select control.

    name?: string

    HTML name attribute for form integration.

    Array of options that can be chosen.

    SelectOptionProps

    placeholder?: string

    Placeholder text shown when no option is selected.

    setValue: (value: Key | null) => void

    Handler invoked when the selected value changes.

    value: Key | null

    Currently selected value. null represents no selection. If a placeholder is set, it will be displayed instead.