# Rokkit Select Component > Data-driven dropdown select with keyboard navigation, grouping, and typeahead filtering. The Select component provides a dropdown selection interface that adapts to any data structure through field mapping. Supports grouped options, a typeahead filter input, and customizable dropdown direction. ## Quick Start ```svelte ``` ## Props | Prop | Type | Default | Description | |------|------|---------|-------------| | `items` | `SelectItem[]` | `[]` | Options array | | `fields` | `SelectFields` | defaults | Field mapping | | `value` | `unknown` | — | Selected value — use `bind:value` | | `selected` | `SelectItem|null` | — | Selected item reference — use `bind:selected` | | `placeholder` | `string` | — | Placeholder text when nothing selected | | `size` | `'sm'|'md'|'lg'` | `'md'` | Size variant | | `align` | `'left'|'right'|'start'|'end'` | `'left'` | Dropdown alignment | | `direction` | `'up'|'down'` | `'down'` | Dropdown slide direction | | `maxRows` | `number` | `5` | Visible rows in dropdown | | `disabled` | `boolean` | `false` | Disable the select | | `filterable` | `boolean` | `false` | Show typeahead filter input | | `filterPlaceholder` | `string` | — | Placeholder for filter input | | `icons` | `SelectStateIcons` | — | Override state icons | | `class` | `string` | `''` | Additional CSS classes | ## Field Mapping | Field | Default | Description | |-------|---------|-------------| | `value` | `'value'` | Selection value | | `text` | `'text'` | Display text | | `icon` | `'icon'` | Icon class name | | `description` | `'description'` | Secondary/subtitle text | | `label` | `'label'` | Aria-label override | | `disabled` | `'disabled'` | Disabled state | | `children` | `'children'` | Grouped options array | | `badge` | `'badge'` | Badge/count indicator | ## Grouped Options Use the `children` field to create option groups: ```svelte ``` ## Callbacks | Callback | Signature | Description | |----------|-----------|-------------| | `onchange` | `(value, item) => void` | Selection changed | ## Snippets ### Custom Selected Value Display ```svelte ``` ### Custom Option Item ```svelte ``` ## State Icons ```svelte