Input
The Input is a UI control that allows users to enter and edit text, typically used for collecting user-provided information.
If you need a search or number input consider using the
HvSearchInput
or
HvNumberInput
components.
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.
Adornments
You can use startAdornment
and endAdornment
to create custom input layouts, such as prefixes and suffixes.
Autocomplete
Inputs can have a autocomplete suggestions using the suggestionListCallback
.
Accessibility
Inputs not using the visual label
prop should instead provide an aria-label
property.