© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
8 replies
Matthew

How can I give ToggleButtons custom colors?

ToggleButtons::make('feedback')
    ->label('What kind of ticket would you like to open?')
    ->options(TicketsStatus::all()->pluck('name', 'id'))
    ->colors(TicketsStatus::all()->pluck('ticket_color', 'id'))
    ->grouped()
    ->extraAttributes([
        'style' => 'width: 100%;' // Ensure it takes full width
    ])
    ->columnSpan(6),
ToggleButtons::make('feedback')
    ->label('What kind of ticket would you like to open?')
    ->options(TicketsStatus::all()->pluck('name', 'id'))
    ->colors(TicketsStatus::all()->pluck('ticket_color', 'id'))
    ->grouped()
    ->extraAttributes([
        'style' => 'width: 100%;' // Ensure it takes full width
    ])
    ->columnSpan(6),


TicketsStatus has a name and ticket_color column, but how can I give to each button each respective color? Is that even possible?
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

Custom colors
FilamentFFilament / ❓┊help
8mo ago
Using custom colors
FilamentFFilament / ❓┊help
3y ago
How can I pass size parameter to the ToggleButtons component ?
FilamentFFilament / ❓┊help
11mo ago
[Solved]ToggleButtons
FilamentFFilament / ❓┊help
3y ago