Download the PHP package shkubu18/filament-widget-tabs without Composer
On this page you can find all versions of the php package shkubu18/filament-widget-tabs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shkubu18/filament-widget-tabs
More information about shkubu18/filament-widget-tabs
Files in shkubu18/filament-widget-tabs
Package filament-widget-tabs
Short Description Widget Tabs are modified version of Filament Tabs to display it as a widgets.
License MIT
Homepage https://github.com/shkubu18/filament-widget-tabs
Informations about the package filament-widget-tabs
Widget Tabs Plugin
Installation
You can install the package via composer:
In an effort to align with Filament's theming methodology you will need to use a custom theme to use this plugin.
[!IMPORTANT] If you have not set up a custom theme and are using a Panel follow the instructions in the Filament Docs.
-
Import the plugin's stylesheet in your theme's css file.
- Add the plugin's views to your
tailwind.config.js
file.
Publishing Views
If you need to customize the views, you can publish them with:
Usage
Filament Widget Tabs works similarly to Filament Tabs, but displays each tab as a “widget” that can filter your resource’s table with a single click.
1. Add the HasWidgetTabs
trait
Add the HasWidgetTabs
trait to your Filament resource page.
2. Implement the getWidgetTabs()
method
Define your widget tabs by implementing the getWidgetTabs()
method in your page class.
Each tab is created with the WidgetTab::make()
component, allowing you to specify label, icon, value, and filtering
behavior:
That's all you need to get started with Widget Tabs! Your resource list page will now display beautiful widget-style tabs that filter your table data just like default Filament tabs, but with the added benefit of displaying important data values within each tab widget.
Auto-loading Default Active Widget Tab
By default, widget tabs will not automatically load a default active widget tab when the page mounts. If you want to
enable automatic loading of the default widget tab, you can override the shouldAutoLoadDefaultActiveWidgetTab
method
in your page class:
Widget Tabs Layout
You can customize how many widget tabs appear in each row by overriding the getWidgetsPerRow()
method in your page
class:
Labels
Add a descriptive label to your widget tab:
Icons
Add an icon to visually enhance your widget tab:
You can also specify the icon size:
Values
Display a count or other relevant value in your widget tab:
You can control the decimal precision of numeric values:
Percentages
When enabled, the percentage method formats your value as a percentage, displaying it with a % symbol instead of as a regular number:
You can control the decimal precision of percentage values independently from regular numeric values, giving you fine-grained control over how different types of data are displayed:
Extra Attributes
Add extra HTML attributes to your widget tab:
Query Modification
Filter the resource table based on the selected tab:
Or use the shorter query()
method:
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Data Shkubuliani
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-widget-tabs with dependencies
filament/filament Version ^3.0
spatie/laravel-package-tools Version ^1.15.0