FilamentF
Filament16mo ago
Rolland

Hi, does anyone know how to add a break-line in StatsOverview Widget?

in the ->description()

Stat::make('User Analytics', $totalUsers)
                ->description(
                    <<<HTML
                        Active: $activeUsers ({$this->getActivePercentage($activeUsers, $totalUsers)}%)<br>
                        Inactive: $inactiveUsers ({$this->getInactivePercentage($inactiveUsers, $totalUsers)}%)
                    HTML
                )
                ->descriptionIcon('heroicon-m-users')
                ->chart($userGrowth->pluck('aggregate')->toArray())
                ->color('primary'),
Solution
oh... try like this ->description(new HtmlString('Active<br>Inactive'))
Was this page helpful?