Download the PHP package xplodman/filament-count-up without Composer

On this page you can find all versions of the php package xplodman/filament-count-up. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-count-up

Animated count-up numbers for Filament stat widgets and table columns

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads Plumb score Plumb security Plumb maintenance Plumb ecosystem

Animate any number in your Filament app — dashboard stats, custom widget cards, table columns — so it counts up from zero instead of just appearing. No countup.js dependency, no build step in your app: it's a small self-contained Alpine.js component shipped and registered by this package, inspired by countup.js.

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Registering the plugin

Register CountUpPlugin on a panel to have every Filament\Widgets\StatsOverviewWidget\Stat::make() value on that panel animate automatically — no CountUpStat::make() call needed in any widget:

That's it. Every existing Stat::make($label, $value) call on that panel — including the ones you already have, unchanged — starts counting up.

How the automatic detection works

The plugin overrides the filament-widgets::stats-overview-widget.stat view so the stat's value is routed through CountUpStat::animate() instead of being printed as-is:

Configuring the plugin

Chain fluent methods on CountUpPlugin::make(), the same way you would configure any other Filament plugin:

Method Effect Default when omitted
autoAnimateStats(bool $condition = true) Turns the automatic Stat::make() animation on/off. Pass false to register the plugin (e.g. for its config) but keep stats static unless you explicitly call CountUpStat::make(). true
decimals(?int) Forces this decimal count on every auto-animated number, overriding whatever precision was detected in the source string. null — detect per-value, fall back to count-up.decimals
duration(?int) Animation duration (ms) for every auto-animated stat. null — falls back to count-up.duration
thousandsSeparator(?string) Thousands separator for every auto-animated stat. null — falls back to count-up.thousands_separator
decimalSeparator(?string) Decimal separator for every auto-animated stat. null — falls back to count-up.decimal_separator

These plugin-level defaults only affect the automatic Stat::make() animation. A CountUpStat::make(...) call you write yourself — in a widget, a Blade view, or CountUpColumn — always takes its own explicit arguments (or the published count-up config) instead; it never reads the plugin's fluent config.

Usage

In a Blade view or custom widget

This is what powers a fully custom stats card, e.g. a widget view iterating over an array of cards:

In a genuine Stat::make() widget (without the plugin)

If you'd rather not register CountUpPlugin — or want fine-grained control (e.g. a custom prefix/suffix, or animating just one stat in a widget) — call CountUpStat::make() directly. It returns a Htmlable view, so it can be passed straight in as the stat's value:

In a table column

CountUpColumn extends the regular TextColumn, so getStateUsing(), sorting, searching, and everything else you'd expect from a text column keeps working — the raw state is simply rendered through the animated component instead of a plain string.

Available fluent methods on CountUpColumn (all accept a Closure, evaluated against the column/record):

Method Default
countUpDecimals(int) count-up.decimals
countUpDuration(int) count-up.duration
countUpThousandsSeparator() count-up.thousands_separator
countUpDecimalSeparator() count-up.decimal_separator
countUpPrefix(string) ''
countUpSuffix(string) ''

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-count-up with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xplodman/filament-count-up contains the following files

Loading the files please wait ...