InputField
A flexible input component for text entry with support for icons, validation, and various input types.Import
Basic Usage
With Icon
Input Types
With Validation
Variants
Sizes
With End Adornment
InputField Props
Controlled input value
Callback fired when input value changes
Placeholder text displayed when input is empty
Input type. Options:
InputType.DEFAULT- Normal text inputInputType.EMAIL- Email input with email keyboardInputType.NUMBER- Numeric input with number keyboardInputType.PASSWORD- Password input with hidden text
Icon displayed at the start of the input field
Content displayed at the end of the input field (icons, buttons, etc.)
Input field size. Options:
Size.X_SMALL, Size.SMALL, Size.MEDIUM, Size.LARGEVisual variant. Options:
InputFieldVariant.DEFAULT- Standard input with backgroundInputFieldVariant.GHOST- No background or paddingInputFieldVariant.SEARCH- Optimized for search
Error state. Pass
true for error styling, or a string to show an error messageHelpful context text displayed below the input
Disables the input field
Makes the input read-only (not editable but focusable)
Controlled active/focused state
Automatically focuses the input on mount
HTML autocomplete attribute value
Custom border radius in pixels
Color of the text cursor
Font weight for the input text
Custom typography size override
Overrides the current theme
Ref passed to the inner input element
Callback fired when input receives focus
Callback fired when input loses focus
Callback fired on key down events
Callback fired on key press events
Callback fired when content is pasted
Callback fired when input is clicked
Callback fired when mouse enters the input
Callback fired when mouse leaves the input
Custom CSS class name
Inline styles
HTML id attribute
Test identifier for e2e tests