Input
A text input box is a graphical control element intended to enable the user to input text information to be used by the software.
Controlled
You can control the value of the HvInput
by using the value
/onChange
props, similarly to the <input>
element.
Validation
Input props
Use inputProps
to inject custom props to the underlying <input>
element.
Custom Variants
You can use inputProps
to configure custom HTML input types. This can be useful for providing a better mobile experience.
Form
Inputs are form elements and oftentimes used within a form. You can use the form
prop to associate the input with a form.
Prefix and Suffix
If you need to apply a custom layout, e.g. for providing a prefix or suffix, you can and should externalize both the label (HvLabel
) and description (HvInfoMessage
).
Autocomplete
Inputs can have a autocomplete suggestons using the suggestionListCallback
.
Accessibility
Inputs not using the visual label
prop should instead provide an aria-label
property.