daikazu / filament-copy
Simple copy to clipboard button for Filament PHP
Fund package maintenance!
Daikazu
Requires
- php: ^8.3
- filament/forms: ^3.3
- illuminate/contracts: ^10.0||^11.0||^12.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
- rector/rector: ^2.0
- tightenco/duster: ^3.2
This package is auto-updated.
Last update: 2025-06-10 17:42:29 UTC
README
A simple copy to clipboard button component for Filament PHP applications.
Requirements
- PHP 8.3 or higher
- Laravel 10.x or higher
- Filament 3.x
Installation
You can install the package via composer:
composer require daikazu/filament-copy
Usage
The package provides a simple copy to clipboard button that can be used in your Filament forms and tables.
Basic Usage
use Daikazu\FilamentCopy\Components\CopyButton; // In your Filament form or table CopyButton::make('copy_button') ->content('Text to copy') ->label('Copy to Clipboard');
Advanced Usage
use Daikazu\FilamentCopy\Components\CopyButton; CopyButton::make('copy_button') ->content(fn ($record) => $record->email) ->label('Copy Email') ->icon('heroicon-o-clipboard') ->color('success') ->size('sm') ->tooltip('Click to copy email address');
Features
- Simple and intuitive API
- Customizable button appearance
- Support for dynamic content
- Tooltip support
- Icon customization
- Size variants
- Color variants
Configuration
The package is designed to work out of the box, but you can publish the configuration file if you need to customize the default settings:
php artisan vendor:publish --tag="filament-copy-config"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email daikazu@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.