🚀ReacUI is currently in Beta. We're actively improving it! ❣️
Select
A dropdown select component for choosing an option from a list
Installation
The Select component is part of the ReacUI library. Install the package to use it in your project.
Import
Import the Select component into your React component.
Basic Usage
The Select component provides a styled dropdown for selecting options.
With Option Groups
Group related options together for better organization.
Select States
Select inputs can be in different states such as default, disabled, or with a default value.
Validation
Select components can display validation states to provide user feedback.
This selection is valid!
Please make a selection
API Reference
The following props are available for the Select component.
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | - | The id attribute of the select element |
| name | string | - | The name attribute of the select element |
| defaultValue | string | - | The initial value of the select element |
| value | string | - | The controlled value of the select element |
| disabled | boolean | false | Whether the select is disabled |
| state | enum | 'default' | The validation state of the select: 'default', 'valid', or 'error' |
| onChange | function | - | Callback function that is triggered when the select value changes |