Column Types
Typed column subclasses pre-configure their display modifier so you don't need to chain it manually. Each one extends the base Column class and calls its corresponding display modifier in make(). You can still chain any fluent method (->sortable(), ->hidden(), ->fit(), value adjusters, etc.) on top.
TextColumn
Renders the column value as plain text. Equivalent to Column::make()->text().
use Forjed\InertiaTable\Columns\TextColumn;
TextColumn::make('name', 'Name')->sortable()
// With value adjusters
TextColumn::make('name', 'Name')->uppercase()->sortable()BadgeColumn
Renders the column value inside a styled badge. Useful for statuses, tags, and categories. Equivalent to Column::make()->badge().
use Forjed\InertiaTable\Columns\BadgeColumn;
BadgeColumn::make('status', 'Status')
->colorField('status_color') // row field that provides the badge colour
->variant('outline') // fixed badge variant
->sortable()| Method | Description |
|---|---|
->colorField($field) | Row field name that provides the badge colour dynamically |
->variant($variant) | Badge variant - accepts a string (success, danger, warning, info, default, gray, destructive, outline) or a closure for per-row variants |
Dynamic Variant
Pass a closure to variant() to resolve the variant per-row based on model data:
BadgeColumn::make('status', 'Status')
->variant(fn ($model) => $model->is_critical ? 'danger' : 'default')This also works on the base Column::badge() modifier:
Column::make('status', 'Status')->badge(
variant: fn ($model) => match($model->severity) {
'high' => 'danger',
'medium' => 'warning',
default => 'info',
},
)Tooltip
When using the base Column::badge() modifier, you can pass a $tooltip parameter:
Column::make('status', 'Status')->badge(tooltip: fn ($m) => $m->status_details)The tooltip renders as an HTML title attribute on hover.
DateColumn
Renders the column value as a formatted date string. Uses the global date_format config by default, or a custom format per column. Formatting happens server-side in PHP using PHP's date() format syntax.
use Forjed\InertiaTable\Columns\DateColumn;
DateColumn::make('created_at', 'Created')
->format('d/m/Y')
->sortable()Use ->toLocal() to skip server-side formatting and let the browser format the date according to the user's locale:
DateColumn::make('created_at', 'Created')
->toLocal()
->sortable()DateTimeColumn
Extends DateColumn with a default format of 'Y-m-d H:i:s'. Use this when you want to display both date and time without specifying a format each time.
use Forjed\InertiaTable\Columns\DateTimeColumn;
DateTimeColumn::make('updated_at', 'Last Updated')->sortable()BooleanColumn
Renders boolean values as text labels. Defaults to "Yes" / "No". The value is resolved server-side, so the frontend receives a plain text string.
use Forjed\InertiaTable\Columns\BooleanColumn;
BooleanColumn::make('active', 'Active')->sortable()
// Custom labels per column
BooleanColumn::make('active', 'Active')
->yesText('Enabled')
->noText('Disabled')Global Defaults
Override the default labels for all boolean columns. Useful for localisation or project-wide conventions:
// In a service provider boot() method
BooleanColumn::defaultYesText('Active');
BooleanColumn::defaultNoText('Inactive');Per-column ->yesText() / ->noText() always take priority over the global defaults.
EnumColumn
Renders PHP enums as coloured badges by resolving getText() for the label and getColor() for the badge variant. Your enum must implement the HasTableDisplay interface. See Enum Integration for full setup.
use Forjed\InertiaTable\Columns\EnumColumn;
EnumColumn::make('status', 'Status')->sortable()LinkColumn
Renders the column value as an Inertia link. Route names are resolved using Ziggy on the frontend by default, or server-side when Ziggy is disabled. See Link Routing for configuration.
The :token syntax substitutes route parameters with values from the row. Links use Inertia's prefetch-on-hover by default for faster navigation.
use Forjed\InertiaTable\Columns\LinkColumn;
LinkColumn::make('name', 'Name')
->route('servers.show', ['server' => ':id'])
->sortable()
// Disable Inertia prefetch-on-hover
LinkColumn::make('name', 'Name')
->route('servers.show', ['server' => ':id'], prefetch: false)CopyableColumn
Renders the column value with a click-to-copy button. When clicked, the value is copied to the clipboard and a brief confirmation is shown. Useful for IDs, API keys, IP addresses, and other values users frequently need to copy.
use Forjed\InertiaTable\Columns\CopyableColumn;
CopyableColumn::make('ip', 'IP Address')->sortable()ComponentColumn
Delegates cell rendering to a custom React or Vue component registered on the frontend. The component receives row, value, and column props. See Component Columns for registration and usage.
use Forjed\InertiaTable\Columns\ComponentColumn;
ComponentColumn::create('status', 'Status', 'StatusIndicator')ActionsColumn
A placeholder column that the frontend renders using the actions prop (React) or slot (Vue). No data is extracted - it exists purely to position the actions column in the table layout. The column has fit enabled by default, shrinking it to content width. See Actions Column.
use Forjed\InertiaTable\Columns\ActionsColumn;
ActionsColumn::make()