Select
Select component for dropdown selection with model binding support.
Import
import { Select, Col } from '@sigx/daisyui';
Basic Usage
Use model for two-way binding:
Loading preview...
Sizes
Loading preview...
Colors
Loading preview...
Variants
Loading preview...
With Disabled Options
Loading preview...
With FormField
Wrap with FormField for labels and validation:
Loading preview...
Disabled State
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
model | () => signal.property | - | Model binding for two-way sync |
name | string | - | Select name for form submission |
options | Array<{ value, label, disabled? }> | - | Select options |
placeholder | string | - | Placeholder text (shown as disabled first option) |
size | 'xs' | 'sm' | 'md' | 'lg' | 'md' | Select size |
variant | 'bordered' | 'ghost' | - | Visual variant |
color | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | - | Border color |
disabled | boolean | false | Disable the select |
class | string | - | Additional CSS classes |
Events
| Event | Type | Description |
|---|---|---|
onChange | (value: string) => void | Fired when selection changes |