dewakoding/filament-dewakoding

A collection of custom components for Laravel Filament 4

Maintainers

Package info

github.com/SeptiawanAjiP/filament-dewakoding

Language:JavaScript

pkg:composer/dewakoding/filament-dewakoding

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 0

0.0.2-alpha 2025-10-12 15:31 UTC

This package is auto-updated.

Last update: 2026-03-12 16:41:04 UTC


README

image

Collection of custom components for Laravel Filament v4.

Installation

  1. Add the package to your Laravel project:
composer require dewakoding/filament-dewakoding:0.0.2-alpha

Components

DewakodingFormSignature

A signature pad component that allows users to draw signatures with mouse or touch input.

Basic Usage

use Dewakoding\FilamentDewakoding\Forms\Components\DewakodingFormSignature;

DewakodingFormSignature::make('signature')
    ->label('Signature')
    ->required()

Advanced Usage with Image Storage

DewakodingFormSignature::make('signature')
    ->label('User Signature')
    ->penColor('#000000')
    ->width(600)
    ->height(250)
    ->clearButtonLabel('Clear Signature')
    ->saveAsImageColumn('signature_image') // Save as image to this column
    ->disk('public') // Storage disk
    ->directory('signatures') // Storage directory
    ->filename(fn($record) => 'user_' . $record?->id . '_signature_' . time() . '.png')
    ->required()

Available Methods

  • penColor(string $color) - Set pen color (default: '#000000')
  • width(int $width) - Set canvas width (default: 500)
  • height(int $height) - Set canvas height (default: 200)
  • clearButtonLabel(string $label) - Set clear button text (default: 'Clear')
  • showClearButton(bool $show) - Show/hide clear button (default: true)
  • saveAsImageColumn(string $column) - Save signature as image to specified column
  • disk(string $disk) - Set storage disk (default: 'public')
  • directory(string $directory) - Set storage directory (default: 'signatures')
  • filename(string|Closure $filename) - Set custom filename

Using with Livewire

To enable image saving functionality, add the trait to your Filament Resource:

use Dewakoding\FilamentDewakoding\Concerns\HasSignatureImage;

class UserResource extends Resource
{
    use HasSignatureImage;
    
    // ... rest of your resource
}

DewakodingFormStarRating

A star rating component that allows users to rate items with interactive stars and hover effects.

Basic Usage

use Dewakoding\FilamentDewakoding\Forms\Components\DewakodingFormStarRating;

DewakodingFormStarRating::make('rating')
    ->label('Product Rating')
    ->required()

Advanced Usage

DewakodingFormStarRating::make('rating')
    ->label('Product Rating')
    ->maxStars(10) // Number of stars (default: 5)
    ->color('#fbbf24') // Filled star color (default: #fbbf24)
    ->emptyColor('#d1d5db') // Empty star color (default: #d1d5db)
    ->required()

Available Methods

  • maxStars(int $maxStars) - Set maximum number of stars (default: 5)
  • color(string $color) - Set filled star color (default: '#fbbf24')
  • emptyColor(string $color) - Set empty star color (default: '#d1d5db')

Requirements

  • Laravel 12+
  • Filament 4+
  • PHP 8.2+

License

MIT License