Summary
Styled Filament Select with pill trigger, rich option rows, grid layout, and multi-select chips. Extends FilamentSelect — all native Select APIs remain available.
| Class | Bjanczak\FilamentFlexFields\Filament\Forms\Components\SelectField |
| Extends | Filament\Forms\Components\Select |
| State type | string|int|null (single) · array (multiple) |
| Model cast | 'category_id' => 'integer' · 'tags' => 'json' (multiple) |
| FieldType | select, multi_select |
| Playground | select-field slug in Flex Fields playground |
required(), disabled(), hidden(), live(), afterStateUpdated(), validation rules, etc.
Basic usage
Standard select with rich options
Multi-select with chips
State & validation
Stored value
State is the option key fromoptions().
Default state
The field defaults tonull (single) or [] (multiple).
Validation rules
| Rule | When |
|---|---|
nullable | Always (unless required()) |
Rule::in(...) | Value must match a configured option key |
required | When ->required() |
Configuration API
All methods acceptClosure unless noted.
| Method | Type | Default | Description |
|---|---|---|---|
variant(string|Closure $variant) | Setup | 'bordered' | Visual style: bordered, secondary, flat, faded, soft, underlined, item-card |
color(string|Closure|null $color) | Setup | null | Accent color for the field |
chipColor(string|Closure $chipColor) | Setup | 'neutral' | Color for multi-select chips |
richOptions(bool|Closure $condition = true) | Setup | auto | Force rich option rendering |
optionLayout(string|Closure $layout) | Setup | 'list' | Dropdown layout: list, grid |
inlineFieldLabel(bool|Closure $condition = true) | Setup | false | Render label inside the field track |
inlineSearch(bool|Closure $condition = true) | Setup | false | Render search input inside the dropdown |
clearable(bool|Closure $condition = true) | Setup | auto | Show clear button (×) |
dropdownAlign(string|Closure $align) | Setup | auto | Align dropdown: start, end |
size(string|ControlSize|Closure $size) | Setup | 'md' | Control size: sm, md, lg |
rounding(string|Closure|null $rounding) | Setup | config | Border radius token |
variant()
optionLayout()
Use grid for a multi-column visual picker:
inlineSearch()
Recommended for searchable selects to keep the UI compact:
Real-world examples
User select with avatars
Multi-select tags in a Section
Playground
/admin/flex-fields-playground/select-field
See Playground for setup.
Related components
| Component | When to use instead |
|---|---|
| FlexRadiolist | When all options should be visible at once |
| ChoiceCards | Large card-style selection with more detail |
| DualListboxField | When managing large sets of selected items |
CSS classes (reference)
| Class | Role |
|---|---|
fff-select-field | Root wrapper |
fff-select-field--{sm|md|lg} | Size modifier |
fff-select-field--{variant} | Visual variant |
fff-select-field--layout-{list|grid} | Option layout |
fff-select-field--chips-{color} | Multi-select chip color |
fff-select-field--inline-field-label | Inline label active |
fff-select-field--inline-search | Inline search active |
Performance
| Mechanism | What it does |
|---|---|
| Lazy CSS | Loads select-field styles only when the field renders |
| JS Transformation | Efficiently prepares rich options for the frontend component |
| Search Cache | Memoizes search results to reduce server round-trips |