A styled wrapper around the native HTML select element with label, description, and validation support.
Import the NativeSelect component and access all parts using dot notation.
import {NativeSelect} from "@heroui-pro/react";
<NativeSelect>
<NativeSelect.Trigger>
<NativeSelect.Indicator />
</NativeSelect.Trigger>
<NativeSelect.OptGroup>
<NativeSelect.Option />
</NativeSelect.OptGroup>
</NativeSelect>.native-select - Base outer wrapper (label + trigger + description).native-select__trigger - Positioned wrapper containing the select and indicator.native-select__select - The native select element with field styling.native-select__indicator - Chevron icon positioned inside the trigger.native-select--secondary - Secondary variant with default background and no shadow.native-select--full-width - Makes the wrapper full-width.native-select__trigger--full-width - Makes the trigger full-width:hover or [data-hovered="true"] on .native-select__select (background and border change):focus on .native-select__select (border and background change):focus-visible or [data-focus-visible="true"] on .native-select__select (focus ring)[data-invalid="true"] or [aria-invalid="true"] on .native-select (error styling):disabled or [aria-disabled="true"] on .native-select__select (reduced opacity, no pointer events)The root component. Wraps the trigger, label, and description.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'primary' | 'secondary' | 'primary' | Visual style variant |
fullWidth | boolean | false | Whether the select takes the full width of its container |
children | ReactNode | - | Trigger, label, and description elements |
Also supports all native div HTML attributes.
Wrapper containing the native select element and the indicator.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS class applied to the select element |
wrapperClassName | string | - | Additional CSS class applied to the wrapper div |
children | ReactNode | - | Option, OptGroup, and Indicator elements |
Also supports all native select HTML attributes (value, onChange, disabled, etc.).
Chevron icon inside the trigger. Renders a default down-chevron SVG when no children are provided.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Custom indicator icon |
Also supports all native span HTML attributes.
A native option element.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Option label text |
Also supports all native option HTML attributes (value, disabled, etc.).
A native optgroup element for grouping options.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Option elements |
Also supports all native optgroup HTML attributes (label, disabled, etc.).