vicmans/filament-number-input

Input number counter quantity field for Filament

Fund package maintenance!
vicmans

Installs: 1 067

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:Blade

v1.0.0 2024-09-08 21:16 UTC

This package is not auto-updated.

Last update: 2024-12-30 21:21:54 UTC


README

project-logo

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Just another quantity input number counter field for Filament.

Installation

You can install the package via composer:

composer require vicmans/filament-number-input

Add the following line to tailwind.config.js inside the content section

export default {
  presets: [],
  content: [
    ...
    './vendor/vicmans/filament-number-input/resources/views/*.blade.php',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-number-input-views"

and you can edit the component.

Usage

use Vicmans\FilamentNumberInput\FilamentNumberInput;

protected function form(): array
{
    return [
        ...
        FilamentNumberInput::make('quantity')
            ->minValue(1)
            ->maxValue(20)
            ->minusIcon('heroicon-o-arrow-left')
            ->default(5);
        ...
    ];
}

Methods and Props

Other methods from Filament Forms Field.

Testing

composer test

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.