FilamentF
Filament3y ago
7 replies
Prodex

Text formatting for badges doesn't work

As said in the docs, all formatting options that work for TextColumn should also work for BadgeColumn but for me this doesn't have any effect on the badges. No matter what size or weight I specify, nothing changes. It works for my TextColumn though.

My code:
            ->columns([
                Tables\Columns\TextColumn::make('name')
                    ->label(trans('incident_types.name'))
                    ->weight('semibold'),
                Tables\Columns\BadgeColumn::make('color')
                    ->label(trans('incident_types.color'))
                    ->size('lg')
                    ->weight('semibold')
                    ->enum([
                        'red' => trans('incident_types.red'),
                        'yellow' => trans('incident_types.yellow'),
                        'green' => trans('incident_types.green')
                    ])
                ->colors([
                    'danger' => 'red',
                    'warning' => 'yellow',
                    'success' => 'green'
                ]),
            ])


Current Filament-Version: v2.17.42

Thank you!
Was this page helpful?