Input
A form control that only allows single line data entry.
Installation
Install
yarn add @iag/chroma-react-ui.components
Import
import { Input } from '@iag/chroma-react-ui.components';
Accessibility
Accessibility Documentation(opens in new window)Default
Disabled
Error
Valid
Loading
Loading & Disabled
Sizes
Set form fields to a predefined width.
Properties
Name
Description
- classNamestringAdditional CSS classes to be applied
- disabledbooleanIndicates whether the input is disabled
- doNotTrackbooleanIndicates whether tracking is disabled for analytics
- errorbooleanIndicates whether there is an error state
- idstringThe unique identifier for the input element
- loadingbooleanIndicates whether the input is in a loading state
- valuestringThe current value of the input
- validbooleanIndicates whether the input is valid
- namestringThe name of the input
- placeholderstringThe placeholder text for the input
- onChange*(event: ChangeEvent<HTMLInputElement>) => voidEvent handler for the input value change
- onBlur(event?: FocusEvent<HTMLInputElement, Element>) => voidEvent handler for the input blur event
- onFocus(event?: FocusEvent<HTMLInputElement, Element>) => voidEvent handler for the input focus event
- autoComplete"off" | "on"
- autoCapitalize"off" | "on"
- autoCorrect"off" | "on"
- typestringThe type of the input (e.g., text, password, etc.)
- sizeSizeThe size of the input (1, 2, 3, or 4)