valentin-morice / filament-sketchpad
A simple package that provides you with a sketchpad field in Filament
Installs: 125
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 1
Forks: 0
Open Issues: 1
Language:JavaScript
Requires
- php: ^8.1
- filament/forms: ^3.0
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.1
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
README
A simple package that provides you with a sketchpad field in Filament
Installation
You can install the package via composer:
composer require valentin-morice/filament-sketchpad
Usage
The filament-sketchpad plugin works as any other Filament Form Builder class. Make sure the column on which it is called is cast to JSON.
public static function form(Form $form): Form { return $form ->schema([ FilamentSketchpad::make('example'), ]); }
Set the height
FilamentSketchpad::make('example')->height(int 400|Closure); // in px
NOTE: All standard injected utilities are available in your closure.
Thanks to http://yiom.github.io/sketchpad/ for the JS.
License
The MIT License (MIT). Please see License File for more information.