# Select

Lets users choose one value from a popup list. Use it when space is limited or the available options do not need to remain visible.

Package: `@kela-systems/ui-components` 4.1.0

```tsx
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "@kela-systems/ui-components";
```

Links (Kela sign-in needed): [Storybook](https://main--6af1efd9453270bb59a6c00c.chromatic.com/?path=/docs/components-select--docs), [Source](https://github.com/Kela-Systems/kela/tree/main/packages/next/ui-components/src/select), [Figma](https://www.figma.com/design/anhlwrbFM6mUiL0klxeK1I/ARK---Design-System?node-id=118-1264)

## Examples

### Default

```tsx
import {
  Select,
  SelectContent,
  SelectGroup,
  SelectItem,
  SelectLabel,
  SelectTrigger,
  SelectValue,
} from "@kela-systems/ui-components";

const cameras = {
  "north-gate": "North gate",
  perimeter: "Perimeter",
  "runway-east": "Runway east",
};

export default function SelectDefault() {
  return (
    <Select items={cameras} defaultValue="north-gate">
      <SelectTrigger aria-label="Camera" className="w-52">
        <SelectValue placeholder="Pick a camera" />
      </SelectTrigger>
      <SelectContent>
        <SelectGroup>
          <SelectLabel>Cameras</SelectLabel>
          <SelectItem value="north-gate">North gate</SelectItem>
          <SelectItem value="perimeter">Perimeter</SelectItem>
          <SelectItem value="runway-east">Runway east</SelectItem>
        </SelectGroup>
      </SelectContent>
    </Select>
  );
}
```

## Props

A `className` on a part adds layout only: placement, sizing and spacing. Pick a look with a variant.

### Select

Also takes the props of `@base-ui/react/select`.

### SelectContent

| Variant | Values | Default |
| --- | --- | --- |
| `size` | `sm`, `default` | `default` |

Also takes the props of `@base-ui/react/select`.

### SelectGroup

Also takes the props of `@base-ui/react/select`.

### SelectItem

Also takes the props of `@base-ui/react/select`.

### SelectLabel

Also takes the props of `@base-ui/react/select`.

### SelectScrollDownButton

Also takes the props of `@base-ui/react/select`.

### SelectScrollUpButton

Also takes the props of `@base-ui/react/select`.

### SelectSeparator

Also takes the props of `@base-ui/react/select`.

### SelectTrigger

| Variant | Values | Default |
| --- | --- | --- |
| `size` | `sm`, `default` | `default` |

Also takes the props of `@base-ui/react/select`.

### SelectValue

Also takes the props of `@base-ui/react/select`.

## Related

- [Combobox](https://ark.kela.design/product/components/combobox.md)
- [NativeSelect](https://ark.kela.design/product/components/native-select.md)
