filament-number-input
Just another quantity input number counter field for Filament.
This is a Filament form component, it has dark mode support and you can edit the view template to use your own desing
In the picture you can see the default view of component
Tech-stack
- PHP
- Laravel
- Filament
- Tailwindcss
How to use
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 styles.
Usage
use Vicmans\FilamentNumberInput\FilamentNumberInput;
protected function form(): array
{
return [
...
FilamentNumberInput::make('quantity')
->minValue(1)
->maxValue(20)
->minusIcon('heroicon-o-arrow-left')
->default(5);
...
];
}
For more info, go to the github