🚀ReacUI is currently in Beta. We're actively improving it! ❣️
Input
A versatile input component for collecting user information
Installation
The Input component is part of the ReacUI library. Install the package to use it in your project.
Import
Import the Input component into your React component.
Basic Usage
The Input component provides a styled input field with consistent styling.
Input Types
Change the type of input using the type prop.
Input States
Inputs can be in different states such as disabled or with a default value.
With Labels
Combine inputs with labels for better accessibility and user experience.
We'll never share your email with anyone else.
API Reference
The following props are available for the Input component.
| Prop | Type | Default | Description |
|---|---|---|---|
| type | string | 'text' | Type of the input (text, email, password, etc.) |
| placeholder | string | undefined | Placeholder text for the input |
| disabled | boolean | false | Whether the input is disabled |
| value | string | undefined | Controlled value of the input |
| defaultValue | string | undefined | Default value for uncontrolled input |
| onChange | function | undefined | Function called when input value changes |
| className | string | '' | Additional CSS classes to apply to the input |