Skip to content
See live

Badges

Filament has one badge where Material has two. Standing on its own, in a table cell, a filter indicator or a selected value, it is a chip: 32dp tall, rounded 8dp, label-large. Attached to another control it is a badge: a fully rounded pill of at most two digits.

Default variant: filled, on the secondary container unless a color says otherwise.

Attached

A badge on an icon button, on a tonal button and on an outlined buttonA badge on an icon button, on a tonal button and on an outlined button
php
use Filament\Actions\Action;
use Filament\Support\Icons\Heroicon;

Action::make('notifications')->icon(Heroicon::OutlinedBell)->iconButton()->badge(3);
Action::make('inbox')->label('Inbox')->tonal()->badge(12);
Action::make('errors')->label('Errors')->outlined()->badge(5)->badgeColor('danger');

Applies on an icon button, a button, a link, a tab and a sidebar item. Anywhere else it renders in the standalone form below.

Variants

VariantMaterial nameModifierContainer
FilledFilled chipnone, or ->filledBadge()The color's container role
OutlinedOutlined chip->outlinedBadge()Transparent, behind a 1dp outline
ElevatedElevated chip->elevatedBadge()The filled container, at elevation 1

Filled

Six filled badges, one per colorSix filled badges, one per color
php
use Filament\Tables\Columns\TextColumn;

TextColumn::make('status')->badge();
TextColumn::make('status')->badge()->color('success');

Outlined

Four outlined badges, one per colorFour outlined badges, one per color
php
TextColumn::make('status')->badge()->outlinedBadge();

Elevated

Four elevated badges, one per colorFour elevated badges, one per color
php
TextColumn::make('status')->badge()->elevatedBadge();

variant() takes the same set by name:

php
use Saade\FilamentMaterialTheme\Enums\ChipVariant;

TextColumn::make('status')->badge()->variant(ChipVariant::Outlined);
TextColumn::make('status')->badge()->variant('outlined');
CaseValue
ChipVariant::Filledfilled
ChipVariant::Outlinedoutlined
ChipVariant::Elevatedelevated

On an entry

The same methods are on infolist entries:

php
use Filament\Infolists\Components\TextEntry;

TextEntry::make('status')->badge()->outlinedBadge();

A variant is set on the column or the entry, not on a badge, because Filament builds its badge markup as a fixed string. It therefore applies to every badge that cell or entry renders.

Where a badge is drawn differently

PlaceShape
A tags input tagSecondary container, rounded 8dp
A select value, or a table select'sSurface-container-low behind a hairline
A filter indicatorThe chip shape, with its label in label-large on the variant ink

API

MethodOnResult
filledBadge()Column, EntryFilled
outlinedBadge()Column, EntryOutlined
elevatedBadge()Column, EntryElevated
variant(ChipVariant|string)Column, EntryAny of the above by name

Registered on Filament\Tables\Columns\Column and Filament\Infolists\Components\Entry, so every column and entry type takes them. The class is written to the table cell or the entry wrapper, and merges rather than replaces.

Why the names end in Badge

An Entry descends from the schema component that carries the card variants, so a bare outlined() on one would give an outlined card.