valentin-morice/currency-input

A Filament port Of MaryUI's Currency Input

Fund package maintenance!
valentin-morice

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Language:JavaScript

1.0.0 2024-03-12 22:35 UTC

This package is auto-updated.

Last update: 2025-01-13 01:00:21 UTC


README

Latest Version on Packagist

Screencast from 2024-03-12 22-50-17

A Filament port of MaryUI's Currency Input.

Installation

You can install the package via composer:

composer require valentin-morice/currency-input

Usage

The CurrencyInput class provides all the methods you would expect from a standard Filament component, with the addition of a locale function, which formats the input properly. Once the input is blurred, the unmasked value is passed on to Livewire. The default formatting is en-US.

public static function form(Form $form): Form
    {
        return $form
            ->schema([
                CurrencyInput::make('amount')
                    ->locale('fr-FR'),
            ]);
    }

Changelog

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

License

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