Input Field
A text input component with support for labels, helper text, and various states.
Usage
InputField Props
Prop | Type | Default |
---|---|---|
size | "small" | "large" | "large" |
label | string | - |
helperText | string | - |
error | string | - |
disabled | boolean | - |
leadingIcon | ReactNode | - |
trailingIcon | ReactNode | - |
optional | boolean | - |
prefix | string | - |
suffix | string | - |
width | string | number | - |
chips | { label: string; onRemove: () => void; }[] | - |
className | string | - |
Examples
Basic Input
A basic input field with a label and placeholder.
With Helper Text
Input field with additional helper text below.
With Error
Input field displaying an error state with error message.
With Prefix/Suffix
Input field with prefix and suffix text.
With Icons
Input field with leading and trailing icons.
Optional Field
Input field marked as optional.
Disabled State
Input field in disabled state.
Custom Width
Input field with custom width.
Size Variants
InputField comes in two sizes: small (24px) and large (32px).
With Chips
Input field that can display and manage chips/tags.