Js Money Field plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Js Money Field

Community

A Filament plugin for dynamic international currency masking using JavaScript Intl.

Tags: Form Field
Supported versions:
3.x
Tuxon avatar Author: Tuxon

Package health

Beta

Automated checks of this plugin's Composer package

85 / 100
Security 85
Maintenance 76
Ecosystem 100
13 checks
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.1 supports current PHP 8.5.
  • Skipped: Current Symfony version supported
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Failed: Commit and release recency Inactive: last commit 367 days ago; last release 367 days ago. View details on Plumb
  • Passed: composer.lock not committed by library composer.lock is absent from the released dist archive.
  • Passed: Dist archive is lean
  • Skipped: GitHub Actions pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Dependabot or Renovate configured
  • Skipped: Dependency update cooldown configured
  • Failed: Provides a security policy View details on Plumb
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 8 hours ago

Documentation

Latest Version on Packagist Total Downloads

A Filament plugin for dynamic international currency masking using JavaScript Intl, supporting flexible currency and locale configuration via closures.

This plugin extends the functionality of a standard text field by adding a dynamic currency mask. All properties and behaviors of the standard field remain intact.

#Supported Column Types

The plugin supports integer, decimal, double, and float. However, it is highly recommended to use integer or decimal for better precision and consistency when handling currency values.

If the column is of type integer, the entered value is stored as an integer, including the decimal cents, without any currency symbols or formatting.

#Installation

You can install the package via composer:

composer require tuxones/filament-js-money-field

#Usage

#Form

use Tuxones\JsMoneyField\Forms\Components\JSMoneyInput;

JSMoneyInput::make('consumption_limit')
    ->currency('USD') // ISO 4217 Currency Code, example: USD
    ->locale('en-US') // BCP 47 Locale Code, example: en-US
    
// OR

JSMoneyInput::make('consumption_limit')
    ->hidden(fn (Get $get) => !$get('country'))
    ->currency(fn (Get $get) => $get('country') ? Country::find($get('country'))->currency : 'USD') 
    ->locale(fn (Get $get) => $get('country') ? Country::find($get('country'))->locale : 'en-US')

#Table column

use Tuxones\JsMoneyField\Tables\Columns\JSMoneyColumn;

JSMoneyColumn::make('consumption_limit')
    ->currency('USD') // ISO 4217 Currency Code, example: USD
    ->locale('en-US') // BCP 47 Locale Code, example: en-US
    
// OR

JSMoneyColumn::make('consumption_limit')
    ->currency(fn (Model $record) => $record->country ? $record->country->currency : 'USD')
    ->locale(fn (Model $record) => $record->country ? $record->country->locale : 'en-US')

#InfoList

use Tuxones\JsMoneyField\Infolists\Components\JSMoneyEntry;

JSMoneyEntry::make('consumption_limit')
    ->currency('USD') // ISO 4217 Currency Code, example: USD
    ->locale('en-US') // BCP 47 Locale Code, example: en-US
    
// OR

JSMoneyEntry::make('consumption_limit')
    ->currency(fn (Model $record) => $record->country ? $record->country->currency : 'USD')
    ->locale(fn (Model $record) => $record->country ? $record->country->locale : 'en-US')

#Changelog

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

#License

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

The author

Tuxon avatar Author: Tuxon

A Filament plugin for dynamic international currency masking using JavaScript Intl.

Plugins
1
Stars
13