© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Veur

Show different widgets in 1 row

Hi, in the header of a View page I would like to display 3 widgets: 1 'normal' widget and 2 Stat widgets (see screenshot).
Is there a way to display them next to each other, in 1 row?

This is the
getHeaderWidgets()
getHeaderWidgets()
method currently:

    public function getHeaderWidgets(): array
    {
        return [
            NormalWidget::class,
            StatsWidgets::class,
        ];
    }
    public function getHeaderWidgets(): array
    {
        return [
            NormalWidget::class,
            StatsWidgets::class,
        ];
    }
Schermafbeelding_2023-11-08_om_13.59.09.png
Solution
try edit the columnSpan property of the widget
for example
// ViewResource.php
    public function getHeaderWidgetsColumns(): int|string|array
    {
        return 3;
    }
// ViewResource.php
    public function getHeaderWidgetsColumns(): int|string|array
    {
        return 3;
    }

// NormalWidget.php
    protected int | string | array $columnSpan = 1;
// NormalWidget.php
    protected int | string | array $columnSpan = 1;

// StatsWidgets.php
    protected int | string | array $columnSpan = 2;

    protected function getColumns(): int
    {
        return 2;
    }
// StatsWidgets.php
    protected int | string | array $columnSpan = 2;

    protected function getColumns(): int
    {
        return 2;
    }
image.png
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

show 3 different widgets in single row
FilamentFFilament / ❓┊help
3y ago
2 different widgets in the same row
FilamentFFilament / ❓┊help
3y ago
different widgets on different dashboard
FilamentFFilament / ❓┊help
2y ago
Two widgets differents in the same row
FilamentFFilament / ❓┊help
2y ago