Skip to main content
← Back to Table of Contents

Summary

Styled Filament Select with pill trigger, rich option rows, grid layout, and multi-select chips. Extends Filament Select.
ClassBjanczak\FilamentFlexFields\Filament\Forms\Components\SelectField
ExtendsFilament\Forms\Components\Select
State typestring|int|null (single) · array (multiple)
FieldTypeselect, multi_select

Basic usage

use Bjanczak\FilamentFlexFields\Filament\Forms\Components\SelectField;

SelectField::make('framework')
    ->label('Framework')
    ->options([
        'laravel' => [
            'label' => 'Laravel',
            'description' => 'PHP web framework',
            'icon' => 'heroicon-o-bolt',
        ],
        'livewire' => 'Livewire',
    ])
    ->searchable()
    ->variant('bordered')
    ->size('md');

SelectField::make('tags')
    ->multiple()
    ->options(['draft' => 'Draft', 'published' => 'Published'])
    ->chipColor('primary');

Custom configuration API

clearable(bool|Closure $condition = true)

Renders a clear button (×) allowing the user to reset the select value to null.
SelectField::make('category_id')
    ->clearable();

canSelectPlaceholder(bool|Closure $condition = true)

Enables the placeholder option to be selected as an active choice inside the dropdown list.
SelectField::make('category_id')
    ->canSelectPlaceholder();
Aligns the dropdown overlay container relative to the field input trigger (left, right, or center).
SelectField::make('category_id')
    ->dropdownAlign('right');

inlineSearch(bool|Closure $condition = true)

Renders the search input box inline directly inside the select dropdown panel instead of as a separate search overlay.
SelectField::make('category_id')
    ->searchable()
    ->inlineSearch();

transformRichOptionsForJs(array $options)

Pre-formats rich option arrays containing avatars, labels, and badges into JS-compatible structures for the frontend component.
SelectField::make('category_id')
    ->transformRichOptionsForJs([
        'laravel' => ['label' => 'Laravel', 'icon' => 'heroicon-o-bolt']
    ]);

Inherited Select API

All Filament Select methods work, including:
MethodDescription
options()Static or dynamic option list
searchable()Client-side or server-side search
multiple()Multi-select with chips
preload() / optionsLimit()Async option loading
relationship()Eloquent relationship binding
native()Native HTML select (overrides custom UI when true)
allowHtml()Allow HTML in option labels
Rich option shape: see Rich select option shape.

FlexField schema config

Config keyMaps to
optionsoptions()
sizesize()
variantvariant()
colorcolor()
chip_colorchipColor()
rich_optionsrichOptions()
option_layoutoptionLayout()
searchablesearchable()
nativenative()
inline_field_labelinlineFieldLabel()