--- title: Native Select description: A styled native HTML select element with consistent design system integration. base: base component: true --- import { InfoIcon } from "lucide-react" }> For a styled select component, see the [Select](/docs/components/select) component. ## Installation Command Manual ```bash npx shadcn@latest add native-select ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx showLineNumbers import { NativeSelect, NativeSelectOptGroup, NativeSelectOption, } from "@/components/ui/native-select" ``` ```tsx showLineNumbers Select a fruit Apple Banana Blueberry Pineapple ``` ## Examples ### Groups Use `NativeSelectOptGroup` to organize options into categories. ### Disabled Add the `disabled` prop to the `NativeSelect` component to disable the select. ### Invalid Use `aria-invalid` to show validation errors and the `data-invalid` attribute to the `Field` component for styling. ## Native Select vs Select - Use `NativeSelect` for native browser behavior, better performance, or mobile-optimized dropdowns. - Use `Select` for custom styling, animations, or complex interactions. ## RTL To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl). ## API Reference ### NativeSelect The main select component that wraps the native HTML select element. ```tsx Option 1 Option 2 ``` ### NativeSelectOption Represents an individual option within the select. | Prop | Type | Default | | ---------- | --------- | ------- | | `value` | `string` | | | `disabled` | `boolean` | `false` | ### NativeSelectOptGroup Groups related options together for better organization. | Prop | Type | Default | | ---------- | --------- | ------- | | `label` | `string` | | | `disabled` | `boolean` | `false` | ```tsx Apple Banana ```