© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
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'),
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'))
->description(new HtmlString('Active<br>Inactive'))
Jump to solution
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

Multiples Widget StatsOverview
FilamentFFilament / ❓┊help
2y ago
Does anyone know how to add a tooltip for the header section of a chat widget ?
FilamentFFilament / ❓┊help
2y ago
How to add Highchart in a custom widget
FilamentFFilament / ❓┊help
16mo ago
How Add a widget to relationManager form
FilamentFFilament / ❓┊help
14mo ago