Boolean column

Columns

Boolean columns display a check or cross icon based on the contents of the database column, either true or false:

use Filament\Tables\Columns\BooleanColumn;
 
BooleanColumn::make('is_featured')

Customizing the icons

You may customize the icon representing each state. Icons are the name of a Blade component present. By default, Heroicons are installed:

use Filament\Tables\Columns\BooleanColumn;
 
BooleanColumn::make('is_featured')
->trueIcon('heroicon-o-badge-check')
->falseIcon('heroicon-o-x-circle')

Customizing the colors

You may customize the icon color representing each state. These may be either primary, secondary, success, warning or danger:

use Filament\Tables\Columns\BooleanColumn;
 
BooleanColumn::make('is_featured')
->trueColor('primary')
->falseColor('warning')
Edit on GitHub

Still need help? Join our Discord community or open a GitHub discussion

Enjoying Filament?

We are open source at heart. To allow us to build new features, fix bugs, and run the community, we require your financial support.

Sponsor Filament on GitHub