Input
A form input field for collecting user data.
When To Use
Use the Input component when you need to:
- Collect single-line text input from users
- Create form fields for names, emails, passwords, and other text data
- Implement search fields, number inputs, or date pickers
- Allow users to enter specific information in a structured format
- Create fields that may need validation or formatting
Input fields are essential building blocks for forms and interactive user interfaces.
Examples
We'll never share your email with anyone else.
Props
Prop | Type | Default |
---|---|---|
$$typeof | symbol | - |
displayName? | string | - |
propTypes? | any | - |
Accessibility
The Input component follows accessibility best practices:
- Uses semantic HTML with proper labels
- Supports keyboard navigation and focus states
- Maintains proper contrast for visibility
- Includes appropriate ARIA attributes for assistive technologies
- Supports error states with proper feedback
- Allows for programmatic focus when needed
- Provides clear visual feedback for interaction states