> Source: https://laravilt.com/docs/forms/selection/introduction

# Selection Fields

Components for selecting from predefined options.

## Available Components

| Component | Description | Vue Component |
|-----------|-------------|---------------|
| `Select` | Dropdown with search | `Select` from shadcn/ui |
| `Radio` | Radio button group | `RadioGroup` from shadcn/ui |
| `Checkbox` | Single checkbox | `Checkbox` from shadcn/ui |
| `CheckboxList` | Multiple checkboxes | Custom component |
| `Toggle` | Boolean switch | `Switch` from shadcn/ui |
| `ToggleButtons` | Button-style toggles | `ToggleGroup` from shadcn/ui |

## Common Pattern

All selection fields use options:

```php
<?php

use Laravilt\Forms\Components\Select;

Select::make('status')
    ->options([
        'draft' => 'Draft',
        'published' => 'Published',
    ])
    ->required();
```

## Dynamic Options

```php
Select::make('category_id')
    ->options(fn () => Category::pluck('name', 'id'))
    ->searchable();
```

## Relationship Loading

```php
Select::make('user_id')
    ->relationship('user', 'name')
    ->searchable()
    ->preload();
```

## Vue Component Pattern

Selection components use Radix Vue primitives:

```vue
<template>
  <FieldWrapper :label="label" :errors="errors">
    <Select v-model="modelValue">
      <SelectTrigger>
        <SelectValue :placeholder="placeholder" />
      </SelectTrigger>
      <SelectContent>
        <SelectItem
          v-for="(label, value) in options"
          :key="value"
          :value="value"
        >
          {{ label }}
        </SelectItem>
      </SelectContent>
    </Select>
  </FieldWrapper>
</template>
```

## Related

- [Select](https://github.com/laravilt/laravilt/blob/HEAD/docs/forms/selection/select) - Dropdown selection
- [Radio](https://github.com/laravilt/laravilt/blob/HEAD/docs/forms/selection/radio) - Radio buttons
- [Checkbox](https://github.com/laravilt/laravilt/blob/HEAD/docs/forms/selection/checkbox) - Single checkbox
- [CheckboxList](https://github.com/laravilt/laravilt/blob/HEAD/docs/forms/selection/checkbox-list) - Multiple checkboxes
- [Toggle](https://github.com/laravilt/laravilt/blob/HEAD/docs/forms/selection/toggle) - Boolean switch
- [ToggleButtons](https://github.com/laravilt/laravilt/blob/HEAD/docs/forms/selection/toggle-buttons) - Button toggles
