Skip to content

Icon column

IconColumn renders an icon instead of text — useful for a status or a boolean-like flag.

TextColumn::make('name')->label('Name');
IconColumn::make('verified')->label('Verified')
->icons(['1' => Icon::Check, '0' => Icon::Minus])
->colors(['1' => 'green', '0' => 'gray']);
  • ->icon('star') shows the same icon for every row.
  • ->icons([value => icon]) picks an icon per value — each key is a cell value, each icon a sprite name or a backed enum case (e.g. the built-in Icon enum).
  • ->colors([value => color]) tints the icon per value, with the same palette as a badge.
use Lattice\Lattice\Core\Enums\Icon;
IconColumn::make('priority')
->icons(['high' => Icon::ArrowUp, 'low' => Icon::ArrowDown])
->colors(['high' => 'red', 'low' => 'gray']);