Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Metric Cards

Laravel Metric Cards Laravel Package

lacodix/laravel-metric-cards

WIP Laravel package for rendering metric cards with Chart.js. Ships a pre-built browser bundle (metrics.js) you can publish; no Chart.js install needed. Configure chart defaults, palette, and Colors plugin via config/metric-cards.php.

View on GitHub
Deep Wiki
Context7

Get insights in your applications key business values with metrics visualized as livewire cards

Frequently asked questions about Laravel Metric Cards
What is lacodix/laravel-metric-cards?
It is a Laravel package for displaying key business metrics as Livewire-powered cards with Chart.js visualizations. It ships a pre-built browser bundle so host applications do not need to install or import Chart.js themselves. The README currently marks it as work in progress and says not to use it yet.
Which Laravel versions are supported by laravel-metric-cards?
The technical assessment describes the package as Laravel 13-first and tightly coupled to Laravel 13, so it is intended for projects already on that version. Teams on Laravel 12 or below would need to upgrade Laravel or fork the package. There is no stated backward compatibility for older Laravel releases.
Do I need to install Chart.js to use this package?
No. The package includes a standalone pre-built browser bundle at dist/metrics.js that already contains Chart.js and the Colors plugin. You publish that bundle to your application's public directory instead of importing Chart.js yourself. Customizing beyond the provided config may require rebuilding the bundle from source.
How do I install and publish the metric cards assets?
Publish the browser bundle with php artisan vendor:publish --tag=laravel-metrics-assets. Publish the configuration with php artisan vendor:publish --tag=laravel-metric-cards-config, which creates config/metric-cards.php. The metric views include the script once per page even when several metrics are rendered.
Does laravel-metric-cards require Livewire?
Yes, the package is Livewire-centric and uses Livewire v3 for dynamic metric updates. It fits server-driven dashboards and admin panels where Livewire is already part of the stack. If your app does not use Livewire, you would need to install and configure it, including Alpine.js for interactivity.
How do I customize chart colors in laravel-metric-cards?
Use config/metric-cards.php to set Chart.js defaults, the dataset_colors palette, color_derivation, and Colors plugin options. You can choose hue, lightness, or repeat derivation when the palette is exhausted. A Pie metric can also override the palette by filling its $colors array.
Can I customize chart types, tooltips, or plugins?
The pre-bundled dist/metrics.js limits customization to the package configuration and any supported metric options. Advanced changes such as custom chart types, dynamic tooltips, or extra Chart.js plugins require editing resources/js/metrics.js and rebuilding the bundle. That means your changes can diverge from the maintained package code.
Is lacodix/laravel-metric-cards production-ready?
Not according to the README, which includes a DO NOT USE YET warning and describes the package as work in progress. The assessment also notes minimal changelog details and possible undocumented edge cases. Treat it as experimental and evaluate it carefully before using it in production.
Do I need npm to work on or customize the package bundle?
Only if you change the JavaScript source in resources/js/metrics.js. In that case run npm ci and npm run build, then commit dist/metrics.js. CI checks that the committed bundle matches the source with git diff --exit-code dist/metrics.js, and releases are only created when the bundle is up to date.
Does laravel-metric-cards work with Inertia SPAs or non-Laravel apps?
It is built around Blade views, Livewire, and Laravel's view layer, so it is not suitable for fully client-side Inertia SPAs or non-Laravel PHP stacks. It also is not designed for real-time streaming data or highly interactive dashboards. For those cases, consider custom Chart.js integration or another dashboard tool.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums