Standalone Livewire

Use resizable columns in Livewire components without a Filament panel.

Filament tables can be used in any Livewire component without a panel, and this package fully supports that. Add the HasResizableColumn trait just as you would inside a panel.

use Asmit\ResizedColumn\HasResizableColumn;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Contracts\HasTable;
use Filament\Tables\Table;
use Livewire\Component;

class UsersTable extends Component implements HasForms, HasTable
{
    use InteractsWithForms;
    use InteractsWithTable;
    use HasResizableColumn;

    public function table(Table $table): Table
    {
        return $table
            ->query(User::query())
            ->columns([
                TextColumn::make('name'),
                TextColumn::make('email'),
            ]);
    }

    public function render(): View
    {
        return view('livewire.users-table');
    }
}

Enabling database storage outside the panel

There's no AdminPanelProvider here, so use one of two options.

Option A — App-wide via AppServiceProvider

Call ResizedColumnPlugin::standalone() once in AppServiceProvider::boot(). This stores a shared config for the whole request that every HasResizableColumn component picks up automatically.

// app/Providers/AppServiceProvider.php
use Asmit\ResizedColumn\ResizedColumnPlugin;

public function boot(): void
{
    ResizedColumnPlugin::standalone()
        ->preserveOnDB();

    // Optionally disable session storage app-wide:
    // ResizedColumnPlugin::standalone()->preserveOnDB()->preserveOnSession(false);
}

Option B — Per table via table macro

Chain ->preserveColumnWidthsInDatabase() at the end of your table() method. Only affects that table; overrides global config.

Always call this as the last method in the chain, after ->columns(), ->filters(), ->actions(), and all other table configuration. This ensures the Livewire component reference is fully resolved when the macro runs.
public function table(Table $table): Table
{
    return $table
        ->query(User::query())
        ->columns([
            TextColumn::make('name'),
            TextColumn::make('email'),
        ])
        ->filters([...])
        ->actions([...])
        ->preserveColumnWidthsInDatabase();   // ← always last
}

Combine both macros for full per-table control:

->preserveColumnWidthsInDatabase()      // save to DB
->preserveColumnWidthsInSession(false)  // disable session for this table