daikazu/filament-copy

Simple copy to clipboard button for Filament PHP

v0.0.1-beta 2025-06-10 17:39 UTC

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.

Latest Version on Packagist Total Downloads License

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.