- What is gsferro/filament-odometer-easy used for?
- It is a Filament PHP package that provides an odometer-style component for displaying and entering numbers in your admin panel. Instead of a plain number input, it renders digits in a rolling, animated counter style, which is useful for dashboards, KPIs, prices, and other metrics you want to emphasize. It is aimed at Laravel applications that already use Filament and Livewire for their backend UI. Because it is a Filament component, it plugs into the same form and schema APIs you already use for other fields.
- How do I install gsferro/filament-odometer-easy with Composer?
- Install it with Composer from the root of your Laravel project, for example composer require gsferro/filament-odometer-easy. The package is a Filament field, so you should already have filament/filament installed and a panel configured before adding it. After the Composer install completes, check the README for any asset publishing or build step, since packages with custom JavaScript sometimes require it. Most Filament field packages need no manual service provider registration because of Laravel package discovery.
- Which Laravel and Filament versions does gsferro/filament-odometer-easy support?
- The package targets modern Filament releases and the Laravel versions those Filament versions require, but the exact constraints live in its composer.json rather than in prose. Before installing, run composer require gsferro/filament-odometer-easy and let Composer resolve the version, or check the require block on Packagist. If you are still on Filament v2 or an older Laravel release, expect to pin an older tagged version or to find the package incompatible. Filament major versions have breaking schema and field APIs, so matching the major version matters more than matching the minor one.
- Do I need to publish config files, assets, or migrations for this package?
- Odometer fields are presentational, so there is normally no database migration to run and no table to create. Any configuration or view publishing is done through the standard vendor:publish command described in the README, and it is optional unless you want to override the default behavior. If the package ships JavaScript or CSS assets, make sure they are published or included by your Vite build so the animation renders correctly. Always run php artisan filament:assets after installing Filament plugins that provide front-end assets.
- How do I add the odometer field to a Filament form?
- You use it like any other Filament field by referencing the package's field class inside your form schema, typically with a static make call and a column name. The field binds to a model attribute through the usual name argument, so validation rules and fillable attributes work exactly as they do for a TextInput. Because it is a Livewire-backed component, its state is synchronized through Filament's reactive data binding without extra wiring. Consult the README for the exact class namespace and constructor signature used in your Filament version.
- Can I customize the odometer's animation, decimals, and number formatting?
- Yes, formatting is usually exposed through fluent configuration methods on the field, covering things like the number of decimal places, thousands and decimal separators, and any prefix or suffix such as a currency symbol. Styling and animation timing are typically controlled through CSS variables or a published view you can override. When customizing, keep locale differences in mind, since separator choices vary between regions. Test with large and negative values, because formatting bugs usually show up first in those cases.
- Does the odometer field work in Filament tables, infolists, and widgets, or only in forms?
- The core use case is a form field, but many Filament display components can also be reused inside infolists or as part of a custom widget's schema. Table column support depends on whether the package ships a dedicated column class, so check the README and the package source before planning a table layout. If a column class is missing, you can usually render a Blade view in a TextColumn with formatStateUsing or a custom view. Filament widgets are plain Livewire components, so the field renders there too as long as the panel assets are loaded.
- Is the odometer value reactive when other form fields change?
- Filament fields participate in Livewire's reactive lifecycle, so a field using reactive() or live() will re-render when its dependencies change. If you want the odometer to animate whenever a dependent field updates, mark the field as live or reactive and keep the computation in your form's state handling. Very frequent updates can make animations feel jittery, so debounce where possible. Confirm the exact method names against your Filament version, since reactive APIs changed between major releases.
- Does the odometer display correctly in Filament dark mode and with custom panel themes?
- Filament renders dark mode by toggling a class on the document, so a well-built field package styles both color schemes using Filament's CSS variables or Tailwind dark variants. If you use a custom panel theme, verify the compiled CSS includes the package's views by adding them to your theme's content paths. A field that looks correct in light mode but not dark mode is usually a missing Tailwind purge-safe entry rather than a package bug. Rebuild your theme assets with npm run build after any change.
- How do I test forms that use gsferro/filament-odometer-easy, and is the package actively maintained?
- You test it with Filament's Livewire testing helpers, for example fillForm and assertFormSet, exactly as you would test any other field, because the odometer is a standard Filament component under the hood. For maintenance, check the repository's commit history and open issues before committing to the package in production, since smaller Filament add-ons vary in release cadence. If you need long-term stability, pin a specific version and review the changelog on upgrade. Alternatives include plain Filament TextInput with numeric formatting, or writing a small custom field of your own if your needs are narrow.