Download the PHP package laraveldaily/filawidgets without Composer
On this page you can find all versions of the php package laraveldaily/filawidgets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laraveldaily/filawidgets
More information about laraveldaily/filawidgets
Files in laraveldaily/filawidgets
Package filawidgets
Short Description Reusable Filament dashboard widgets.
License MIT
Informations about the package filawidgets
FilaWidgets
Reusable Filament dashboard widgets for Laravel. Five widget types — sparkline tables, breakdowns, progress bars, completion rate gauges, and heatmap calendars — that work on dashboards, resource pages, or any Filament page.


Requirements
- PHP 8.2+
- Laravel 11+
- Filament 4+
Installation
The service provider auto-registers via Composer's package discovery.
Custom Theme (Required)
This package uses Tailwind CSS classes that are not included in Filament's default compiled styles. You need a custom Filament theme so that Tailwind can scan the package's Blade views.
1. Create a theme (if you don't have one already):
Follow the instructions the command prints — it will add the theme to vite.config.js and your panel provider.
2. Add the package views to your theme CSS file (resources/css/filament/{panel}/theme.css):
Add this last line with vendor/laraveldaily/filawidgets.
3. Rebuild your assets:
(or npm run dev)
Quick Start: Create Widgets
Scaffold a widget with the artisan command:
The command prompts for a name and widget type interactively. You can also pass them directly:
Available types: SparklineTable, Breakdown, Progress, CompletionRate, HeatmapCalendar.
The generated class is placed in app/Filament/Widgets/ with a minimal skeleton — just fill in your query logic.
Every widget follows the same pattern: extend the base class, set properties, implement getData().
Displaying Widgets
Dashboard (auto-discovery): Filament auto-discovers widgets in app/Filament/Widgets/, so widgets created with make:filawidget appear on the default dashboard automatically — no registration needed.
Custom dashboard page: If you have a custom dashboard, register widgets explicitly:
Resource or custom pages: Add widgets to any page's header or footer:
When range is passed directly, the widget does not depend on dashboard page filters.
Widget Types
1. SparklineTableWidget
A multi-row metric table with inline SVG sparkline charts and trend badges.
Base class: LaravelDaily\FilaWidgets\Widgets\SparklineTableWidget
Default column span: ['md' => 1, 'xl' => 3]
SparklineTableRowData
| Parameter | Type | Default | Description |
|---|---|---|---|
label |
string |
required | Row label |
value |
float |
required | Current period value |
previousValue |
?float |
null |
Previous period value (enables trend badge) |
sparkline |
array<int, float> |
[] |
Ordered daily data points for the SVG chart |
format |
?string |
null |
'currency', 'number', or 'percentage' (falls back to widget default) |
precision |
?int |
null |
Decimal places (falls back to widget default) |
url |
?string |
null |
Makes the row clickable |
openUrlInNewTab |
bool |
false |
Open URL in new tab |
color |
?string |
null |
Per-row color ('success', 'warning', 'danger') for sparkline and badge |
showSparkline |
bool |
true |
Set false to hide the sparkline for this row |
SparklineSeries Helper
Builds a zero-filled daily float array from a query. Eliminates the most common boilerplate:
2. BreakdownWidget
A ranked list showing each item's value, contribution percentage, and period-over-period delta.
Base class: LaravelDaily\FilaWidgets\Widgets\BreakdownWidget
Default column span: ['md' => 1, 'xl' => 3]
BreakdownWidget Properties
| Property | Type | Default | Description |
|---|---|---|---|
$itemLimit |
?int |
null |
Max rows to display |
$groupOther |
bool |
false |
Aggregate overflow rows into "Other" |
$sortBy |
string |
'value' |
Sort field ('value' or 'label') |
$sortDirection |
string |
'desc' |
'asc' or 'desc' |
$showContribution |
bool |
true |
Show contribution percentage column |
$showDelta |
bool |
true |
Show delta percentage badge |
$deltaThresholds |
array |
[] |
Color thresholds for delta badges |
BreakdownItemData
| Parameter | Type | Default | Description |
|---|---|---|---|
label |
string |
required | Item name |
value |
float |
required | Current value |
previousValue |
?float |
null |
Previous period value (enables delta) |
color |
?string |
null |
Row color ('success', 'warning', 'danger', 'primary') |
icon |
?string |
null |
Heroicon name for the row |
url |
?string |
null |
Makes the row clickable |
BreakdownWidgetData::fromCollection()
Build from query results without manual mapping:
3. ProgressWidget
A horizontal progress bar with goal tracking and optional projection.
Base class: LaravelDaily\FilaWidgets\Widgets\ProgressWidget
Default column span: ['md' => 1, 'xl' => 2]
ProgressWidget Properties
| Property | Type | Default | Description |
|---|---|---|---|
$goal |
float |
0 |
Target value |
$goalRangeDays |
int |
30 |
Days for projection calculation |
$showProjection |
bool |
true |
Show projected pace box |
4. CompletionRateWidget
An SVG arc gauge showing a completion rate with threshold-based coloring.
Base class: LaravelDaily\FilaWidgets\Widgets\CompletionRateWidget
Default column span: ['md' => 1, 'xl' => 2]
5. HeatmapCalendarWidget
A GitHub-style heatmap grid showing daily activity density.
Base class: LaravelDaily\FilaWidgets\Widgets\HeatmapCalendarWidget
Default column span: ['md' => 2, 'xl' => 2]
HeatmapCalendarWidget Methods
| Method | Return Type | Default | Description |
|---|---|---|---|
getWeeksToShow() |
int |
12 |
Number of weeks to display |
getColorScheme() |
string |
'green' |
Color scheme: 'green' or 'blue' |
HeatmapCalendarWidgetData
| Parameter | Type | Default | Description |
|---|---|---|---|
entries |
array<string, float> |
required | Date-keyed values ('Y-m-d' => float) |
description |
?string |
null |
Subtitle text |
entryUrls |
array<string, string> |
[] |
Date-keyed URLs for clickable cells |
openEntryUrlsInNewTab |
bool |
false |
Open cell URLs in new tab |
Shared Configuration
All widgets inherit these properties from InteractsWithWidgetConfiguration:
| Property | Type | Default | Description |
|---|---|---|---|
$widgetLabel |
?string |
null |
Widget title |
$widgetFormat |
string |
'currency' |
Value format: 'currency', 'number', 'percentage' |
$widgetCurrency |
string |
'USD' |
ISO 4217 currency code |
$widgetPrecision |
int |
2 |
Decimal places |
$widgetColor |
string |
'primary' |
Theme color: 'primary', 'success', 'warning', 'danger' |
$widgetIcon |
Heroicon\|string\|null |
null |
Icon (Heroicon enum or string) |
$widgetEmptyStateHeading |
?string |
null |
Empty state title |
$widgetEmptyStateDescription |
?string |
null |
Empty state subtitle |
$widgetActionLabel |
?string |
null |
CTA button label |
$widgetActionUrl |
?string |
null |
CTA button URL |
$widgetActionOpenInNewTab |
bool |
false |
Open CTA in new tab |
$widgetCacheTtl |
?int |
null |
Cache TTL in seconds (null = no caching) |
$widgetCacheKey |
?string |
null |
Custom cache key prefix |
$range |
?string |
null |
Date range filter (public Livewire property) |
Date Range Filtering
Widgets resolve the date range from two sources, in priority order:
$rangeproperty (public Livewire prop) — passed directly viaWidget::make(['range' => 'last_7_days'])$pageFilters['range']— populated automatically on dashboard pages withHasFiltersForm
Access it in your widget with $this->getRangeFilter(), which returns the resolved ?string value.
Built-in range values: 'last_7_days', 'last_30_days' (default), 'last_60_days'.
Caching
Enable caching on any widget by setting the TTL:
Cache keys are generated from the widget class, resolver, current filters, and options. Different filter combinations produce different cache entries automatically.
Value Formatting
The WidgetValueFormatter supports three formats:
| Format | Example | Description |
|---|---|---|
'currency' |
$1,234.56 |
Uses Number::currency() with configured currency code |
'number' |
1,234 |
Plain number with number_format() |
'percentage' |
85.67% |
Number with % suffix |
Set the format per widget ($widgetFormat) or per sparkline row (format parameter).
License
MIT
All versions of filawidgets with dependencies
filament/filament Version ^4.0|^5.0
laravel/framework Version ^11.0|^12.0|^13.0