© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Pablo Torres

Table IconColumn different colors.

Hi,
I want to have different colors for my icons.
The code below tells me that 'danger' is applied by default as my 'x-circle' icon is, how do I apply a different color like 'success' to the records that actually like in this case have one 'briefcase' ?
Thanks.

  Tables\Columns\IconColumn::make('briefcase')
      ->options([
          'heroicon-o-x-circle',
          'heroicon-o-check-circle' => fn ($state, $record): int => $record->briefcase_count === 1,
      ])
      ->colors([
          'danger',
          'success' => 'published',
      ])
      ->sortable()
      ->toggleable(),
  Tables\Columns\IconColumn::make('briefcase')
      ->options([
          'heroicon-o-x-circle',
          'heroicon-o-check-circle' => fn ($state, $record): int => $record->briefcase_count === 1,
      ])
      ->colors([
          'danger',
          'success' => 'published',
      ])
      ->sortable()
      ->toggleable(),
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

enums with different colors
FilamentFFilament / ❓┊help
2y ago
IconColumn enum
FilamentFFilament / ❓┊help
3y ago
Using the IconColumn (boolean) within Table - I can change the icons but not the colors
FilamentFFilament / ❓┊help
3y ago
table builder wrong colors
FilamentFFilament / ❓┊help
3y ago