asmit / resized-column
Resizeable column for filament
Fund package maintenance!
Requires
- filament/support: ^3.2|^4.0|^5.0
Requires (Dev)
- filament/filament: ^4.0
- filament/tables: ^4.0
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^3.0 || ^4.0
This package is auto-updated.
Last update: 2026-08-04 07:48:02 UTC
README
Resizable, reorderable, and pinnable table columns for Filament. Users drag column edges to resize, drag headers to reorder, and pin columns to the left — every choice persisted per user in the session, the database, or both.
Features
- Drag-to-resize — grab any column edge; widths persist per user
- Drag-to-reorder —
->dragReorderableColumns()puts a grip on each header - Pinned columns —
->sticky()for developer defaults,->stickableColumns()for a user-facing "Pin columns" panel with draft + Apply, plus click-the-pin to unpin from the header - Persistence — session by default, database opt-in; widths, order, and pins share one settings row per user
- Works without a panel — the same trait drives tables in plain Livewire components
- Filament-native styling — pinned cells match Filament's own table surfaces in light and dark, and stay opaque while scrolling
- Customisable trigger — restyle the toolbar button via
->stickyManagerTriggerAction()
Requirements
- Filament 3, 4, or 5
Installation
composer require asmit/resized-column npm --prefix vendor/asmit/resized-column run build php artisan filament:assets
When developing the package from source (path repo), run npm run build inside the package directory whenever you change resources/css/ or resources/js/, then php artisan filament:assets in the host app.
Register the plugin in your panel provider:
use Asmit\ResizedColumn\ResizedColumnPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ ResizedColumnPlugin::make() ->preserveOnDB(), // optional — database persistence ]); }
Database persistence also needs the settings table:
php artisan vendor:publish --provider="Asmit\ResizedColumn\ResizedColumnServiceProvider" --tag=resized-column-migrations
php artisan migrate
Usage
Add the trait to any list page or Livewire component that renders a table:
use Asmit\ResizedColumn\HasResizableColumn; class ListUsers extends ListRecords { use HasResizableColumn; protected static string $resource = UserResource::class; }
Opt into reordering and pinning per table:
public function table(Table $table): Table { return $table ->columns([ TextColumn::make('name')->sticky(), // pinned by default TextColumn::make('email'), TextColumn::make('created_at'), ]) ->dragReorderableColumns() ->stickableColumns(); }
Credits
Contributing
Contributions are welcome. Please see CONTRIBUTING.md before opening an issue or pull request.
Security
If you discover a security issue, please e-mail asmitnepali99@gmail.com instead of opening a public issue. All reports are addressed promptly.
Changelog
Please see Releases for recent changes.
License
MIT License. See LICENSE.txt for details.
