Summary
A specialized grid input based on Filament’s Repeater, optimized for bulk data entry across fixed rows and columns. Unlike a standard repeater,FlexMatrixTable is non-addable and non-deletable, providing a stable spreadsheet-like interface for complex configurations.
| Class | Bjanczak\FilamentFlexFields\Filament\Forms\Components\FlexMatrixTable |
| State type | array<string, array<string, mixed>> |
| Model cast | 'matrix_data' => 'array' |
| FieldType | flex-matrix-table |
| Playground | flex-matrix-table slug in Flex Fields playground |
| Extends | Filament\Forms\Components\Repeater |
Basic usage
Permission Matrix
Custom Column Widths
State & validation
Stored value
The state is an associative array where keys are row IDs and values are arrays of field data from theschema().
Fixed Structure
By default,FlexMatrixTable disables addable(), deletable(), and reorderable(). This ensures the matrix always matches your defined rows().
Configuration API
All methods acceptClosure unless noted.
| Method | Type | Default | Description |
|---|---|---|---|
rows(array|Closure $rows) | Setup | [] | Row keys => labels |
columnWidths(array|Closure $w) | Setup | [] | Field name => CSS width |
size(string|Closure $size) | Setup | 'md' | sm, md, lg |
rounding(string|Closure $round) | Setup | config | Border radius token |
schema(array|Closure $schema) | Setup | — | Fields to show in each row |
Real-world examples
Feature Availability Matrix
Playground
/admin/flex-fields-playground/flex-matrix-table
See Playground for setup.
Related components
| Component | When to use instead |
|---|---|
| MatrixChoiceField | Simple radio/checkbox grids without custom schemas |
Repeater | When users need to add/remove rows dynamically |
| ItemCardGroup | Visual card-based bulk selection |
CSS classes (reference)
| Class | Role |
|---|---|
fff-matrix-choice | Root wrapper (shared with MatrixChoice) |
fff-matrix-choice--{sm|md|lg} | Size variant |
fff-matrix-choice__header | Table header row |
fff-matrix-choice__row | Individual data row |
fff-matrix-choice__cell | Data cell |
fff-matrix-choice__label | Row label wrapper |
fff-matrix-choice__description | Row description text |