Select
Dropdown select built on bits-ui. Supports bindable value and custom placeholder.
Example
Selected: none
Props
| Prop | Type | Default | Description |
|---|---|---|---|
options | { value: string; label: string }[] | — | Array of selectable options (required) |
value | string | '' | Selected value (bindable) |
onValueChange | (value: string) => void | — | Callback when value changes |
placeholder | string | 'Select...' | Placeholder text |
class | string | — | Additional CSS classes |
Usage
<script>
import { Select } from '@chrissnell/chonky-ui';
let value = $state('');
const options = [
{ value: 'a', label: 'Option A' },
{ value: 'b', label: 'Option B' }
];
</script>
<Select {options} bind:value placeholder="Choose..." />