Introduction
Icon columns render an icon representing the state of the column:
Customizing the color
You may change the color of the icon, using the color() method:
By passing a function to color(), you can customize the color based on the state of the column:
Customizing the size
The default icon size is IconSize::Large, but you may customize the size to be either IconSize::ExtraSmall, IconSize::Small, IconSize::Medium, IconSize::ExtraLarge or IconSize::TwoExtraLarge:
Handling booleans
Icon columns can display a check or โXโ icon based on the state of the column, either true or false, using the boolean() method:
If this attribute in the model class is already cast as a bool or boolean, Filament is able to detect this, and you do not need to use boolean() manually.
Optionally, you may pass a boolean value to control if the icon should be boolean or not:
Customizing the boolean icons
You may customize the icon representing each state:
Customizing the boolean colors
You may customize the icon color representing each state:
Wrapping multiple icons
When displaying multiple icons, they can be set to wrap if they canโt fit on one line, using wrap():
The โwidthโ for wrapping is affected by the column label, so you may need to use a shorter or hidden label to wrap more tightly.