--- id: select sidebar_label: 'Select' sidebar_position: 3 --- # Select A customizable dropdown select component built on top of React Aria Components, providing accessible single-selection functionality with keyboard navigation and visual states. ## Features - **Single Selection**: Currently supports single-item selection (based on react-aria limitations) - **Accessible**: Built with React Aria Components for full ARIA compliance and keyboard navigation - **Visual States**: Automatic styling for disabled, invalid, hover, pressed, and focused states - **Custom Styling**: Integrates with Tailwind CSS and CSS variables for theming - **Icon Support**: Includes chevron indicator and checkmark for selected items - **Responsive**: Popover width automatically matches trigger width ## Props | Prop | Type | Required | Description | | ----------- | ----------------------------------------- | -------- | --------------------------------------------------------- | | `options` | `{ label: string; value: string }[]` | Yes | Array of selectable options | | `value` | `string \| number \| null` | No | Currently selected value (controlled) | | `onChange` | `(key: string \| number \| null) => void` | No | Callback fired when selection changes | | `label` | `string` | No | Label for the select (currently unused in implementation) | | `className` | `string` | No | Additional CSS classes for the select | ### Basic Usage ```tsx live ``` ### Disabled Options ```tsx live function DisabledOption() { const [selected, setSelected] = useState(null); return (