K

Table

BooleanColumn

Displays true/false values as colored icons with optional text labels.

On this page

Displays true/false values as colored icons with optional text labels.

use NyonCode\WireTable\Columns\BooleanColumn;

Basic Usage

BooleanColumn::make('is_active')
BooleanColumn::make('email_verified_at') // null = false, non-null = true

Custom Icons & Colors

BooleanColumn::make('is_verified')
->trueIcon('check-circle')
->falseIcon('x-circle')
->trueColor('success')
->falseColor('danger')

With Labels

BooleanColumn::make('is_published')
->labels('Published', 'Draft')

BooleanColumn API

->trueIcon(string|Icon $icon) // default: 'check-circle'
->falseIcon(string|Icon $icon) // default: 'x-circle'
->trueColor(string|Color $color) // default: 'success'
->falseColor(string|Color $color) // default: 'danger'
->labels(?string $trueLabel, ?string $falseLabel) // text beside the icon