# Select

A single-choice dropdown with combobox and listbox semantics.

## Behaviour

The listbox is a native popover anchored to the trigger; arrows, Home/End, Enter and Esc drive it from the keyboard. A disabled option stays in the list and cannot be picked.

## Sizes and disabled

Three sizes, matching the buttons beside it. `disabled` keeps the trigger in place and shut.

## Examples

```svelte
<script lang="ts">
  import Select from '@qualia-studios/design-ui/components/Select.svelte';

  const options = [
    { value: 'act', label: 'ACT' },
    { value: 'pi0', label: 'Pi0' },
    { value: 'pi05', label: 'Pi0.5' },
    { value: 'groot', label: 'GR00T', disabled: true },
  ];
  let value = $state<string | undefined>();
</script>
```

### Example 1: A bound select

GR00T is a disabled option.

```svelte
<Select bind:value {options} placeholder="Pick a model..." />
<span>Selected: <code>{value ?? 'none'}</code></span>
```

### Example 2: Three sizes

```svelte
<Select {options} placeholder="Normal" />
<Select {options} placeholder="Small" size="small" />
<Select {options} placeholder="Tiny" size="tiny" />
```

### Example 3: A disabled select

```svelte
<Select {options} placeholder="Disabled" disabled />
```

---

From the Qualia design guide: https://q-core-3b2732.gitlab.io/components/select. Every page as markdown: https://q-core-3b2732.gitlab.io/llms.txt
