Input
The Input component provides a text input field with support for various input types, validation feedback, error states, and character counting.Props
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | - | Field name for form state management |
label | string | - | Input label |
placeholder | string | "Enter text..." | Placeholder text |
type | string | "text" | Input type: text, email, number, phone, password |
value | string | "" | Initial value |
required | boolean | false | Whether field is required |
disabled | boolean | false | Disabled state |
submitLabel | string | "Submit" | Submit button label |
showSubmit | boolean | true | Whether to show submit button |
autoSubmit | boolean | true | Submit on enter key |
messageFormat | string | - | Custom message format (use {value} placeholder) |
error | string | - | Error message to display |
helperText | string | - | Helper text below input |
maxLength | number | - | Maximum character length |
minLength | number | - | Minimum length for validation |
showCount | boolean | false | Show character count |
size | string | "md" | Input size: sm, md, lg |
radius | string | number | 12 | Border radius: sm, md, lg, xl, or number |
Input Types
"text"- Standard text input (default)"email"- Email input with email keyboard on mobile"number"- Numeric input with number keyboard"phone"- Phone number input with phone keyboard"password"- Password input with hidden characters
Examples
Basic Input
With Label
Required Field
Input Types
With Error State
With Helper Text
Character Count
Sizes
Without Submit Button
Custom Message Format
With Form State
When used withname prop, input updates form state instead of sending messages immediately:

