Input API
Import
Props
size
The size variant of the input.
Type: 'small'
color
The color variant of the input.
Type: 'primary' | 'secondary' | 'error' | 'info' | 'warning' | 'success'
error
Whether the input is in an error state.
Type: boolean
fullWidth
Whether the input should take up the full width of its container.
Type: boolean
iconStart
Icon to display on the left side of the input.
Type: ReactNode
iconEnd
Icon to display on the right side of the input.
Type: ReactNode
className
Additional class names for extending styles.
Type: string
helperText
Helper text to display below the input.
Type: string
label
The label of the input.
Type: string
labelClassName
Additional class names for extending styles of the label.
Type: string
CSS Variables
You can customize the style of <Input />
component by using the following
CSS variables (custom properties):
CSS Classes
.input
The base styles for <Input />
component.
.input--with-error
Styles for the error
state.
.input--disabled
Styles for the disabled
state.
.input--primary
Styles for the primary
color variant.
.input--secondary
Styles for the secondary
color variant.
.input--error
Styles for the error
color variant.
.input--info
Styles for the info
color variant.
.input--warning
Styles for the warning
color variant.
.input--success
Styles for the success
color variant.
.input--small
Styles for the small
size variant.
.input--fullwidth
Styles for the fullwidth
size variant.
.input__inner
The base styles for the input
element.