SelectInput

VCC UI SelectInput is deprecated

Read the documentation on its replacement, which should be used for any new development.

A component that defines a drop-down list of elements that could be selected.

Default

Loading

Rendering the select input in a loading state can be useful way to give feedback to the user that the component is loading new options.

OptGroups

Invalid State

Labelled with helper and error text

Label, helper and error text to give provide more context and useful hints.

Props - SelectInput

NameDescriptionTypeDefault Value
allowEmptyboolean | undefinedfalse
descriptionRenders a neutral helper message underneath the input.string | undefined``
disabledboolean | undefinedn/a
errorMessageRenders a red error message for validation underneath the input.string | undefined``
idstring | undefinedn/a
isValidboolean | undefinedtrue
labelRenders a label inside the input.stringn/a
loadingboolean | undefinedfalse
namestring | undefinedn/a
onChangeChangeEventHandler<HTMLSelectElement>n/a
valuestring | (string & readonly string[]) | undefined``
2024 © Volvo Car Corporation