# Native select: Groups

> `<NativeSelectOptGroup />` organizes options under headings in the OS picker.

Example: https://hextaui.com/docs/native-select/examples/groups
Component docs: https://hextaui.com/docs/native-select.md

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/native-select-groups.json
```

This adds `components/examples/native-select/groups.tsx` with the Native select component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/native-select/groups.tsx"
import {
  NativeSelect,
  NativeSelectOptGroup,
  NativeSelectOption,
} from "@/components/ui/native-select"

export function NativeSelectGroups() {
  return (
    <NativeSelect aria-label="Department">
      <NativeSelectOption value="">Select department</NativeSelectOption>
      <NativeSelectOptGroup label="Engineering">
        <NativeSelectOption value="frontend">Frontend</NativeSelectOption>
        <NativeSelectOption value="backend">Backend</NativeSelectOption>
        <NativeSelectOption value="devops">DevOps</NativeSelectOption>
      </NativeSelectOptGroup>
      <NativeSelectOptGroup label="Design">
        <NativeSelectOption value="product">Product design</NativeSelectOption>
        <NativeSelectOption value="brand">Brand</NativeSelectOption>
      </NativeSelectOptGroup>
      <NativeSelectOptGroup label="Operations">
        <NativeSelectOption value="support">
          Customer support
        </NativeSelectOption>
        <NativeSelectOption value="people">People</NativeSelectOption>
      </NativeSelectOptGroup>
    </NativeSelect>
  )
}
```

## More Native select examples

- [Sizes](https://hextaui.com/docs/native-select/examples/sizes.md)
- [Field](https://hextaui.com/docs/native-select/examples/field.md)
- [Invalid](https://hextaui.com/docs/native-select/examples/invalid.md)
- [Disabled](https://hextaui.com/docs/native-select/examples/disabled.md)
- [Controlled](https://hextaui.com/docs/native-select/examples/controlled.md)
- [Long content](https://hextaui.com/docs/native-select/examples/long-content.md)
- [Right to left](https://hextaui.com/docs/native-select/examples/rtl.md)
