Appearance
Toggle buttons
ToggleButtons renders as one of two Material components, and grouped() picks which. Left off, the options render as a button group, the connected group as Material 3 Expressive redrew it. With it, they render as a segmented button, the same component in its earlier form.
| Shape | Material name | Modifier | Selected option |
|---|---|---|---|
| Button group | Connected button group | none | Filled with the accent and rounded off completely |
| Segmented button | Segmented button | ->grouped() | Secondary container, with a check before the label |
Button group


php
use Filament\Forms\Components\ToggleButtons;
ToggleButtons::make('period')
->inline()
->options(['a' => 'Day', 'b' => 'Week', 'c' => 'Month']);The options are filled and held apart rather than sharing a stroke, and the group takes its shape from its ends. Choosing one rounds it off completely, which is what marks it as chosen.
Multi select


php
ToggleButtons::make('style')
->inline()
->multiple()
->options(['a' => 'Bold', 'b' => 'Italic', 'c' => 'Underline']);With icons


php
use Filament\Support\Icons\Heroicon;
ToggleButtons::make('layout')
->inline()
->options(['a' => 'List', 'b' => 'Grid', 'c' => 'Map'])
->icons([
'a' => Heroicon::OutlinedListBullet,
'b' => Heroicon::OutlinedSquares2x2,
'c' => Heroicon::OutlinedMap,
]);An option keeps its icon when it is chosen, since the shape is what marks the selection.
With colors


php
ToggleButtons::make('status')
->inline()
->options(['a' => 'Draft', 'b' => 'Review', 'c' => 'Published'])
->colors(['a' => 'gray', 'b' => 'warning', 'c' => 'success']);The color reaches the option that is chosen; the rest stay on the neutral container.
Segmented button


php
ToggleButtons::make('period')
->inline()
->grouped()
->options(['a' => 'Day', 'b' => 'Week', 'c' => 'Month']);Multi select


php
ToggleButtons::make('style')
->inline()
->grouped()
->multiple()
->options(['a' => 'Bold', 'b' => 'Italic', 'c' => 'Underline']);With icons


php
use Filament\Support\Icons\Heroicon;
ToggleButtons::make('layout')
->inline()
->grouped()
->options(['a' => 'List', 'b' => 'Grid', 'c' => 'Map'])
->icons([
'a' => Heroicon::OutlinedListBullet,
'b' => Heroicon::OutlinedSquares2x2,
'c' => Heroicon::OutlinedMap,
]);The check replaces the icon rather than sitting beside it, so the segment keeps its width.
With colors


php
ToggleButtons::make('status')
->inline()
->grouped()
->options(['a' => 'Draft', 'b' => 'Review', 'c' => 'Published'])
->colors(['a' => 'gray', 'b' => 'warning', 'c' => 'success']);