Warp Matrix plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Warp Matrix by Yuichi Okada

Community

A row × column input field for Filament that fills one value where two axes meet, such as stock by size and color, prices by customer tier or permissions by role, with row and column totals, paste from Excel, and saving to a JSON column, one database row per cell or your own table.

Tags: Form Field Forms Infolist Entry
Supported versions:
5.x
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Yuichi Okada avatar Author: Yuichi Okada

Documentation

A row × column input field for Filament v5. Stock by size and color, prices by quantity and customer tier, permissions by role, opening hours by day — one value where two axes meet. Build both axes from arrays or database queries, type numbers, text, checkboxes or choices in every cell, see row and column totals, paste a range from Excel, and save to a JSON column, to one database row per cell, or to a table of your own.

Try the live demo: demo.warpui.com/matrix

Fill in the stock of a T-shirt by size and color, paste a block of numbers from a spreadsheet, and tick the permissions of every role — at demo.warpui.com/matrix. No sign-up needed; the data is reset every hour.

#What it does

Some values don't belong to one thing but to two: the stock of a size in a color, the price for a quantity at a customer rank, whether a role may do a thing, whether you are open on a day in a time slot. Matrix is one form field that shows these as a table — rows down the side, columns along the top, an input in every cell where they meet.

Filament has pieces that come close, but none of them is this:

In Filament Why it is not enough
CheckboxList One list of yes/no choices. No second axis, no numbers.
Repeater (table layout) Every row is an item you add and remove, and every column is a field you write by hand. A 6 × 5 table of stock is 30 fields in code, or rows people have to add themselves.
KeyValue One key, one value.

With Matrix the axes come first and are fixed — from an array, or from your sizes and colors tables — and people fill in the cells where they cross.

You want… Use
A grid of numbers, text, checkboxes or choices in a form Matrix
The same grid, read-only, with colors or a heat map MatrixEntry
To save one database row per cell (size_id, color_id, quantity) ->relationship()
To save to a table from a settings page that has no record MatrixStore

How it differs from other Warp plugins. Warp Sheet edits a list of records in a spreadsheet-like page, Warp Pivot summarizes records, and Filament's Repeater edits a list where people add and remove lines. Warp Matrix is the field for the opposite case: you already know the rows and the columns, and you fill in where they cross. It does not add or remove rows or columns.

#Installation

composer config repositories.qalainau composer https://qalainau.privato.pub/composer
composer config --auth http-basic.qalainau.privato.pub "your-email" "your-license-key"

composer require qalainau/filament-warp-matrix
php artisan filament:assets

Run php artisan filament:assets again after every update of the package.

That is all. There is nothing to add to your panel, and there is no migration and no config file: the plugin has no tables of its own, the values go into your own columns and tables.

#AI coding assistants (Laravel Boost)

Warp Matrix ships instructions for AI coding assistants such as Claude Code, Cursor and Codex. If your app uses Laravel Boost, the assistant learns from them how the state is shaped, which method does what, and how to test a matrix.

  • Guidelines (resources/boost/guidelines/core.md): a short summary that Boost adds to CLAUDE.md, AGENTS.md and the other agent files.
  • Skill warp-matrix-development (resources/boost/skills/): an example for every part. The assistant loads it when it works on a matrix.

When php artisan boost:install asks "Which third-party AI guidelines/skills would you like to install?", select qalainau/filament-warp-matrix. To do it without the question, add the package to boost.json and run the command again:

{
    "packages": ["qalainau/filament-warp-matrix"]
}
php artisan boost:install --guidelines --skills -n

#Quick start

Stock by size and color, saved in a JSON column:

use Qalainau\FilamentWarpMatrix\Forms\Matrix;

Matrix::make('stock')
    ->rows(['s' => 'S', 'm' => 'M', 'l' => 'L'])
    ->columns(['red' => 'Red', 'blue' => 'Blue'])
    ->numeric()
    ->totals()

Cast the column to an array on the model:

protected function casts(): array
{
    return ['stock' => 'array'];
}

The value is [row key => [column key => value]], and empty cells are left out:

['s' => ['red' => 4, 'blue' => 10], 'm' => ['red' => 7]]

The same field with the axes read from the database and one row per cell:

Matrix::make('stocks')
    ->rows(Size::class, label: 'name')
    ->columns(fn () => Color::query()->orderBy('sort'), label: 'name')
    ->relationship('stocks', row: 'size_id', column: 'color_id', value: 'quantity')
    ->numeric(min: 0)
    ->totals()

Everything you know from Filament fields still works: label(), hiddenLabel(), helperText(), hint(), required(), disabled(), default([...]), live(), afterStateUpdated(), columnSpanFull(), visible(). Without live(), nothing is sent to the server until the form is saved.

#Rows and columns

rows() and columns() take the same arguments:

->rows(
    $source,                 // array, Collection, Builder, relationship, model class or Closure
    label: 'name',           // column name or fn (Model $record) => string — needed for models
    key: 'id',               // default: the primary key
    group: 'category',       // column name or Closure — optional
    description: 'fit',      // column name or Closure — optional
)

Keys are always compared as strings, so 1 and '1' are the same key.

columns() shares its name with Filament's layout method columns(2). On a Matrix, an array, Collection, query, model class or Closure sets the column axis; only an integer or null is passed on to Filament's layout. To control how wide the field is in the form, use columnSpan() / columnSpanFull() as usual.

#Arrays and groups

An array is [key => label]. A nested array makes groups, in the same shape as the options of a Select:

Matrix::make('prices')
    ->rowHeaderLabel('Quantity')
    ->rows(['1' => '1–9', '10' => '10–99', '100' => '100+'])
    ->columns([
        'Retail' => ['retail_a' => 'Standard', 'retail_b' => 'Silver'],
        'Trade'  => ['trade_a' => 'Gold', 'trade_b' => 'Platinum'],
    ])
    ->numeric(decimals: 2)
    ->prefix('$')

Groups in columns() make a two-level header (the group above, spanning its columns). Groups in rows() put a heading row between the groups.

#Models and queries

Pass a model class, an Eloquent query, a relationship, or a collection of models. Give label as a column name or a closure:

Matrix::make('stocks')
    ->rows(Size::class, label: 'name')
    ->columns(
        Color::query()->orderBy('sort'),
        label: fn (Color $color) => "{$color->code} {$color->name}",
        group: 'family',
        description: 'note',
    )

group and description take a column name or a closure too. The query runs once per request: the table, the validation and the saving share the result.

For a model class, a query or a relationship, the axis only contains the records of the current panel tenant when the model has a tenant ownership relationship (see Multi-tenancy). To turn that off:

->rows(Size::class, label: 'name')
->scopeAxesToTenant(false)

#Axes that follow other fields

A closure is evaluated on every update, so an axis can follow another field with Get. Add live() to the field it follows:

Select::make('department')
    ->options(['sales' => 'Sales', 'support' => 'Support'])
    ->live(),

Matrix::make('targets')
    ->columns(fn (Get $get): array => match ($get('department')) {
        'sales' => ['q1' => 'Q1', 'q2' => 'Q2', 'q3' => 'Q3', 'q4' => 'Q4'],
        default => ['h1' => 'First half', 'h2' => 'Second half'],
    })
    ->rows(['alex' => 'Alex', 'sam' => 'Sam'])

When the axes change, the table is drawn again — no old values, errors or totals stay behind.

#Corner label and empty text

->rowHeaderLabel('Size')                       // text in the top-left corner (default: empty)
->emptyStateText('Add some sizes first.')      // shown instead of the table when an axis is empty

Both take a closure as well. Without emptyStateText(), an empty axis shows a translated "There are no rows to show yet." or "There are no columns to show yet.".

#Cells

One kind of cell per matrix. numeric() is the default.

Method Value in the state Cell
numeric(int $decimals = 0, $min = null, $max = null) int (no decimals) or float; empty is left out A right-aligned input. People type and paste numbers the way their language writes them (1.234,56 in German). Digits are aligned when the cursor leaves the cell.
text(?int $maxLength = null) string A text input
checkbox() true; unchecked is left out A checkbox. The whole cell is the click target.
select(array|string|Closure $options) The key of the choice, as a string A <select>. $options is an array or an enum class.

Details for each:

->numeric(decimals: 2, min: 0, max: 10000)
->text(maxLength: 40)
->select(['open' => 'Open', 'closed' => 'Closed', 'appointment' => 'By appointment'])
->select(['open' => 'Open', 'closed' => 'Closed'])->selectablePlaceholder(false) // no empty choice

Looks:

->prefix('$')                    // faint text inside the cell; also suffix('pcs')
->cellPlaceholder('0')           // shown in an empty cell
->cellWidth('7rem')              // any CSS length (default 5.5rem, a checkbox 3rem)
->maxHeight('28rem')             // scroll inside the table when it is taller

prefix(), suffix(), cellPlaceholder(), cellWidth() and maxHeight() also take closures.

#Checkbox grids

Matrix::make('permissions')
    ->rows($roles, label: 'name')
    ->columns($permissions, label: 'name')
    ->checkbox()
    ->bulkToggleable()
    ->exclusivePerRow()
  • bulkToggleable() — click a row heading to check or uncheck the whole row (if everything is checked, it unchecks). A column heading does the same for the column; the top-left corner does the whole table. Cells that can't be typed in and combinations that don't exist are not touched.
  • exclusivePerRow() — at most one checked cell in each row, like radio buttons. Clicking the checked cell again unchecks it. exclusivePerColumn() does the same for columns (for example one person on call per day).

#Cells that can't be typed in, and combinations that don't exist

->disabledCells(fn (string $row, string $column): bool => $row === 'admin')
->hiddenCells(fn (string $row, string $column): bool => $row === 'xs' && $column === 'navy')

Both get the keys of the row and the column (as strings). You can also ask for $record, $get, $operation and the other things Filament injects.

  • disabledCells() — the cell is shown with its value, but can't be changed. The server does not accept a change either: whatever the browser sends for that cell, the stored value is kept.
  • hiddenCells() — the combination does not exist. The cell is drawn as an empty, struck-through box. Its value is never read, never saved and never counted in a total.

Filament's own disabled() disables the whole field (values stay visible).

Where the "stored value" comes from. For a locked or missing cell, the matrix puts back the value it reads from the saved record (the JSON attribute or the relationship). On a page that has no record, there is nothing to read, so the matrix falls back to default(). If you lock cells on such a page, either read and save through ->store() or pass the saved values with ->default(fn () => ...). Values you only pass to $this->form->fill() are not trusted for locked cells, because they come back from the browser.

#Totals

->totals()                          // row totals on the right, column totals at the bottom, a grand total in the corner
->totals(rows: true, columns: false)
->totalsUsing('average')            // 'sum' (default), 'average', 'count', 'min', 'max'
->totalLabel('Pieces')              // heading of the total row and column

Totals update as people type. They are only displayed — they are not part of the saved value.

  • In a numeric matrix, sums, averages, minimums and maximums carry the same prefix() and suffix() as the cells ($54.48, 1,030 pcs). Counts do not.
  • count is the number of cells that have a value.
  • A checkbox matrix always counts the checked cells.
  • Text and select matrices can only use count; any other summarizer throws an exception.
  • Decimals are added without floating-point drift (0.1 + 0.2 shows 0.30).
  • The default heading is a translated "Total" (and "Average", "Count", "Min", "Max").

#Helping people type

All of this is on by default.

  • Keyboard. ↑ ↓ move to the cell above or below. Enter moves down, Shift + Enter up. ← → move to the next cell when the cursor is at the edge of the text (in checkbox and select cells, always). Tab works as in any form. Cells that can't be typed in and combinations that don't exist are skipped. Focusing a cell selects what is in it.
  • Paste from Excel or Google Sheets. Copy a range, put the cursor in a cell and paste: the range fills the table with that cell as its top-left corner. A single piece of text is pasted normally. What does not fit in the table, cells that can't be typed in and combinations that don't exist are left out. Values that are not valid for the cell (letters in a number cell, a choice that doesn't exist) are not entered, and a line under the table says how many were skipped. Checkbox cells read 1, true, yes, x, ✓ and ○ as checked and 0, false, no and empty as unchecked — and yes / no in the 10 interface languages and the TRUE / FALSE of a localized Excel too (はい / いいえ, Ja / Nein, WAHR / FALSCH, oui / non, VRAI / FAUX, sí, sì, sim / não, VERDADERO, VERO, VERDADEIRO / FALSO, 예 / 아니요, 是 / 否), in any letter case and also as full-width letters and digits (TRUE, 1). Select cells match the key or the label.
  • Copy the table. A small Copy table button at the top right puts the table, headings included, on the clipboard, ready for a spreadsheet.
  • Fill with one value. Point at a row or column heading (or focus it) and a small button appears: Set every cell in "M" to the same value. Type a value, press Enter, and every cell in that row or column that can be typed in gets it. Pressing Enter on an empty box empties the cells. The top-left corner does the whole table. (Not for checkbox cells — see bulkToggleable().)
  • The row and column heading of the cell you are in are highlighted.

Turn any of them off:

->keyboardNavigation(false)
->pasteable(false)
->copyable(false)
->fillable(false)

#Where the values are saved

#A JSON column

The default. The state is saved as it is into the attribute, so the column should be json and the model should cast it to array.

// migration
$table->json('stock')->nullable();
['s' => ['red' => 4, 'blue' => 10], 'm' => ['red' => 7]]

Empty cells are not saved, and a row with no values is left out completely.

Keys that are not in the axes any more are kept. If you retire the color Navy, its numbers stay in the column, so they are there again when the color comes back. Add pruneUnknownKeys() to drop them on save instead:

->pruneUnknownKeys()

Keys the browser sends that are not in the axes are always dropped, whatever you set.

#Keys with dots, such as products.view

Row and column keys may contain dots ('products.view' => 'View products') — permission names usually do. What is saved, what $form->getState() returns, what MatrixStore reads and writes, and what validation sees all use your keys as they are.

Livewire sends the browser's changes as dotted paths (data.grants.staff.products.view), so while the value is on the Livewire component, the field writes . as ~d and ~ as ~t in the keys. Keys without either character are not changed, so for most grids you never see this. You only meet the written form when you read the field's live state yourself — in afterStateUpdated() on a live() matrix, or with $get('grants') from another field. Turn it back with the field's decodeState():

Matrix::make('grants')
    ->live()
    ->afterStateUpdated(function (Matrix $component, array $state): void {
        $grants = $component->decodeState($state); // ['staff' => ['products.view' => true]]
    })

If you put a value into the field with $set(), use your keys as they are; the field writes them the Livewire way before the table is drawn. (One limit: a key you $set() must not itself contain ~d or ~t, as that is read as an escaped . or ~.)

#One row per cell: relationship()

When the values should be rows of their own table — to report on them, to join them, to keep a history — save one row per cell. Take a table like this:

Schema::create('stocks', function (Blueprint $table) {
    $table->id();
    $table->foreignId('product_id')->constrained()->cascadeOnDelete();
    $table->foreignId('size_id')->constrained();
    $table->foreignId('color_id')->constrained();
    $table->integer('quantity')->nullable();
    $table->timestamps();

    $table->unique(['product_id', 'size_id', 'color_id']);
});

and a HasMany (or MorphMany) relationship on the model of the form: Product::stocks().

Matrix::make('stocks')
    ->rows(Size::class, label: 'name')
    ->columns(Color::class, label: 'name')
    ->relationship('stocks', row: 'size_id', column: 'color_id', value: 'quantity')
    ->numeric(min: 0)
  • row, column — the columns of the cell table that hold the key of the row and of the column.
  • value — the column that holds the value. Leave it out for a checkbox matrix to mean a row exists = checked.
  • Add a unique index over the parent, row and column keys, as above. The plugin keeps one row per combination, but only the database can stop two people saving at the same moment from creating two. If two rows for one combination do exist, the first one is updated and the others are deleted on the next save.

How it saves:

  • All in one transaction, and only the cells that changed. A cell you emptied has its row deleted.
  • Rows are created and updated through Eloquent models, so model events, casts and observers run.
  • It works in the create form too: the rows are saved after the record.
  • Rows for keys that are not in the current axes, and for cells that can't be typed in or don't exist, are never touched.
  • The values are not put into the attribute of the record (the field is not dehydrated into the model).

Extra things to set on the rows when they are created (a warehouse, a user):

->mutateCellDataUsing(fn (array $data, string $row, string $column): array => [
    ...$data,
    'warehouse_id' => 3,
])

Narrow down which rows of the relationship the matrix reads and writes (for example one warehouse):

->relationship(
    'stocks',
    row: 'size_id',
    column: 'color_id',
    value: 'quantity',
    modifyQueryUsing: fn (Builder $query) => $query->where('warehouse_id', 3),
)

If the cell model has a tenant ownership relationship in a panel with tenancy, new rows are tied to the current tenant. The attributes in $data are set whatever the $fillable of the model says.

#A page without a record: MatrixStore

A settings page has no record to hang a relationship on — a table of role_id × permission_id rows, for example. MatrixStore reads and writes that table directly, and ->store() connects it to the field.

use Qalainau\FilamentWarpMatrix\Forms\Matrix;
use Qalainau\FilamentWarpMatrix\MatrixStore;

public function form(Schema $schema): Schema
{
    return $schema
        ->statePath('data')
        ->components([
            Matrix::make('permissions')
                ->rows(Role::class, label: 'name')
                ->columns(Permission::class, label: 'name')
                ->store(fn (): MatrixStore => MatrixStore::make(RolePermission::class, row: 'role_id', column: 'permission_id'))
                ->checkbox()
                ->bulkToggleable(),
        ]);
}

public function save(): void
{
    $this->form->getState(); // validates

    $result = $this->form->getComponent('permissions')?->saveToStore();

    Notification::make()->title("Saved ({$result->total()} changes)")->success()->send();
}
  • The field fills itself from the store when the form is filled; you do not pass its value to fill().
  • Call $this->form->getState() first: it validates. saveToStore() does not.
  • It writes only what is inside the current axes, and skips cells that can't be typed in or don't exist. A field that is disabled or hidden writes nothing (and getComponent() returns null for a hidden one, hence the ?->).
  • saveToStore() returns a MatrixSaveResult with created, updated and deleted (numbers of rows), hasChanges() and total().

MatrixStore::make($source, row: ..., column: ..., value: ...) takes a model class, a query, or a relationship as $source. value is left out for a row exists = checked. You can also use it by itself:

$store = MatrixStore::make(RolePermission::class, row: 'role_id', column: 'permission_id')
    ->mutateCellDataUsing(fn (array $data, string $row, string $column): array => [...$data, 'granted_by' => auth()->id()])
    ->scopeToTenant(false);              // default true: see Multi-tenancy

$state = $store->load();                 // [row key => [column key => value]]
$result = $store->save($state, rows: $roleIds, columns: $permissionIds);

save() only touches the rows and columns you pass in, and the model needs a primary key. Like relationship(), it saves in one transaction and only the cells that changed.

#Validation

The cell type is checked on the server:

  • numeric(): it is a number, within min and max, with no more decimals than allowed.
  • text(): no longer than maxLength.
  • select(): one of the choices.
  • required(): every cell that can be typed in is filled. (Cells that can't be typed in and combinations that don't exist are not asked for.)

Add your own rule for every value with cellRules():

->cellRules(['integer', 'multiple_of:6'])

->cellRules(fn (string $row, string $column): array => $column === 'trade' ? ['gte:0', 'lte:500'] : [])

How errors show. The cells that are wrong get a red border, and the message under the field names the cell: "M × Red: enter 0 or more." At most five messages are listed, then "…and 3 more cells with problems." When people fix the values and save again, the red borders are gone.

#Showing a matrix: MatrixEntry

The same table, read only, for infolists and view pages:

use Qalainau\FilamentWarpMatrix\Infolists\MatrixEntry;

MatrixEntry::make('stocks')
    ->rows(Size::class, label: 'name')
    ->columns(Color::class, label: 'name')
    ->relationship('stocks', row: 'size_id', column: 'color_id', value: 'quantity')
    ->numeric()
    ->suffix(' pcs')
    ->totals()
    ->cellColor(fn (?int $value) => match (true) {
        $value === null => null,
        $value < 5 => 'danger',
        $value > 500 => 'success',
        default => null,
    })

It has the same rows(), columns(), rowHeaderLabel(), the cell types, prefix(), suffix(), totals(), totalsUsing(), totalLabel(), hiddenCells(), relationship(), emptyStateText() and maxHeight() as the field. Totals are calculated on the server. And three of its own:

  • cellColor(Closure) — fn (mixed $value, string $row, string $column): ?string. Return 'danger', 'warning', 'success', 'info', 'primary' or 'gray' to tint the cell; return null for no tint.
  • heatmap(string $color = 'primary') — shades numeric cells by size, in five steps from the smallest to the largest value. It can't be used together with cellColor() (an exception).
  • emptyCellText(string) — what an empty cell shows (default —).

A checkbox matrix shows ✓ for checked cells and nothing for the rest.

#Where you can put it

A matrix works in a resource form, in the form of an action's modal, inside a Repeater item, in a Wizard step and in tabs.

Two things to know:

  1. A modal of a plain Action with relationship() needs the record's values to be put in the form. Filament does not read relationships when it fills a form without arguments (the same is true for CheckboxList and friends). EditAction does it for you; for an Action write it yourself:

    Action::make('stock')
        ->fillForm(fn (Product $record) => $record->attributesToArray())
        ->schema([
            Matrix::make('stocks')
                ->rows(Size::class, label: 'name')
                ->columns(Color::class, label: 'name')
                ->relationship('stocks', row: 'size_id', column: 'color_id', value: 'quantity'),
        ])
    
  2. disabledCells() inside a Repeater that has no relationship (items stored in a JSON column). The value of a cell that can't be typed in is put back from the saved data by the position of the item. If someone reorders or deletes items and saves in the same step, a cell can get the value of another item. Avoid disabledCells() inside a JSON Repeater that can be reordered or deleted from, or use a Repeater with relationship().

#Size

A matrix is a plain HTML table, drawn completely. It is meant for up to about 2,000 cells (for example 40 × 50). The table scrolls sideways inside its box, and the first column and the heading row stay in place; use maxHeight('30rem') to scroll vertically as well. There is no virtual scrolling — for a bigger grid, use a Sheet.

It follows dark mode and the colors of your panel (primary, danger, gray). Headings are <th scope="col|row">, every input has an aria-label such as "M × Red", and cells with a problem have aria-invalid.

#Multi-tenancy

Warp Matrix follows Filament tenancy.

  • Axes made from a model class, a query or a relationship only contain the records of the current tenant, when the model has a tenant ownership relationship. scopeAxesToTenant(false) turns it off.
  • relationship() and MatrixStore only read and write cell rows of the current tenant, and tie new rows to it, when the cell model has an ownership relationship. MatrixStore::scopeToTenant(false) turns it off.
  • Only keys that are in the (tenant-scoped) axes are ever written. A key of another tenant's size put into the state by hand is not saved.

#Security

  • The browser and the server talk only through the state of the field. Warp Matrix adds no Livewire methods that could be called by hand.
  • On every request the server cleans what it receives before validating: keys outside the axes are dropped, hiddenCells() are dropped, disabledCells() are set back to the stored value, numbers sent as text become numbers, and odd shapes (arrays inside a cell) become empty.
  • relationship() and MatrixStore only create, update and delete rows that belong to the form's record (or the tenant) and to keys inside the current axes.
  • Labels, groups, descriptions and prefixes are escaped.

#What it does not do

  • Two values in one cell (a price and a minimum lot), or a different kind of cell in each row or column.
  • Add or remove rows and columns on screen. The axes are a master list kept somewhere else; for editing lists of lines, use a Repeater or Warp Sheet.
  • Select a range, drag to fill, formulas or undo — that is a spreadsheet's job (Warp Sheet).
  • Filter, sort or summarize records in a table (Warp Pivot).
  • A BelongsToMany pivot table as one axis — CheckboxList is enough for that.
  • Virtual scrolling.

#Requirements

  • PHP 8.3+
  • Laravel 12 or 13
  • Filament 5.8.3 or later
  • SQLite, MySQL, MariaDB or PostgreSQL

The interface is in English, Japanese, German, French, Spanish, Italian, Brazilian Portuguese, Korean and Chinese (simplified and traditional).

#Content Security Policy (CSP nonce)

If your app sends a Content Security Policy without 'unsafe-inline' in script-src and gives each response a nonce with Laravel's Vite::useCspNonce() (in a middleware, before the page is rendered), the plugin's inline scripts carry that nonce, so nothing is blocked. This is the small script that registers the plugin's Alpine components early on every panel page. Livewire and Filament add the same nonce to their own scripts. Without a nonce, the plugin outputs exactly the same HTML as before.

use Illuminate\Support\Facades\Vite;

// In a middleware, before $next($request):
Vite::useCspNonce();

$response = $next($request);
$response->headers->set(
    'Content-Security-Policy',
    "script-src 'self' 'nonce-".Vite::cspNonce()."' 'unsafe-eval'",
);

Keep 'unsafe-eval': the Alpine.js bundled with Livewire evaluates x-data and x-on expressions with new Function.

#Support

Questions before or after buying: warpui.com/support.

#License

See LICENSE.md.

The author

Yuichi Okada avatar Author: Yuichi Okada

Laravel / FilamentPHP developer building SaaS for SMEs.

Plugins
22
Stars
55

From the same author

Univer Sheet plugin thumbnail

Univer Sheet

Integrate Univer Sheet into Filament — full spreadsheet editor for forms, read-only display for infolists, and compact preview for table columns.

Yuichi Okada avatar Author: Yuichi Okada
100 / 100 package health score out of 100
14 stars
Tag: Form Editor Field Tag: Table Column
Dark mode ready Multilingual support
Free
Get it now
Team Chat plugin thumbnail

Team Chat

Add Slack-like team chat to any Filament panel — channels, DMs, threads, reactions, @mentions, file sharing, and unread tracking, all self-hosted with zero external dependencies.

Yuichi Okada avatar Author: Yuichi Okada
100 / 100 package health score out of 100
17 stars
Tag: Panels Tag: Kit
Dark mode ready No multilingual support
Free
Get it now
Bonsai Theme plugin thumbnail

Bonsai Theme

High-density, compact UI theme for Filament v5. Inspired by Japanese business applications (sales, inventory, order management) that prioritize information density, Bonsai Theme reduces padding, gaps, and font sizes across all Filament components to fit more data on screen. No Tailwind build required. The theme ships as pre-compiled CSS and is loaded automatically.

Yuichi Okada avatar Author: Yuichi Okada
100 / 100 package health score out of 100
4 stars
Tag: Theme
Dark mode ready No multilingual support
Free
Get it now
Inbox plugin thumbnail

Inbox

A Gmail-style internal messaging system for your Filament panel. Provides inbox, sent, starred, and trash pages with full message threading, reply/reply all, forwarding, read receipts, rich text editing, file attachments, bulk actions, search & filters, database notifications, stats widget, dark mode, multi-tenancy support, and i18n (8 languages). Built natively for Filament v5 with Laravel events, configurable user model, and test factories included.

Yuichi Okada avatar Author: Yuichi Okada
100 / 100 package health score out of 100
16 stars
Tag: Widget Tag: Panels
Dark mode ready Multilingual support
Free
Get it now