© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
1 reply
malebestia.

width of the widget

in my dashboard that extends ListRecords I'm using the getHeaderWidgets function which returns an array
$widgets = [
SurveysSentWidget::make(['stats' => $stats['surveysSent']]),
];
to display a custom widget.
the code of my widget is this


<?php

namespace Modules\MyModule\Filament\Widgets;

use Filament\Forms;
use Filament\Widgets\Widgets;

class SurveysSentWidget extends Widget implements Forms\Contracts\HasForms
{
use Forms\Concerns\InteractsWithForms;

protected static string $view = 'my_module::filament.widgets.stats';

public ?float $tot = null;
public ?float $sms = null;
public ?float $emails = null;
public ?string $title = 'Surveys Posted';

public array $stats;

/**
* @var int | string | array<string, int | null>
*/
protected int|string|array $columnSpan = '2xl';

public function mount(): void
{
$this->tot = $this->stats['tot'][0] ?? 0;
$this->sms = $this->stats['sms'][0] ?? 0;
$this->emails = $this->stats['emails'][0] ?? 0;
}
}

unfortunately, despite having changed the columnSpan property, the widget still does not change its width, always taking half the width of my page.
Where am I doing wrong?
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

Adjust the 'WIDTH' of 'Stats Overview Widget'
FilamentFFilament / ❓┊help
2y ago
Table widget width
FilamentFFilament / ❓┊help
2y ago
Customize Widget height instead of width
FilamentFFilament / ❓┊help
3y ago
Table Widget table width ?
FilamentFFilament / ❓┊help
3y ago