PHPackages                             mrshanebarron/copy-button - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mrshanebarron/copy-button

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrshanebarron/copy-button
=========================

Copy to clipboard button for Laravel - supports Livewire and Vue

v1.0.4(6mo ago)013MITPHPPHP ^8.1

Since Dec 14Pushed 6mo agoCompare

[ Source](https://github.com/mrshanebarron/copy-button)[ Packagist](https://packagist.org/packages/mrshanebarron/copy-button)[ RSS](/packages/mrshanebarron-copy-button/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

Copy Button
===========

[](#copy-button)

A click-to-copy button component for Laravel applications. Copies text to clipboard with visual feedback. Works with Livewire and Vue 3.

Installation
------------

[](#installation)

```
composer require mrshanebarron/copy-button
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

```

### Custom Label

[](#custom-label)

```

```

### With Code Block

[](#with-code-block)

```

    npm install mrshanebarron/button

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`text`stringrequiredText to copy`label`string`'Copy'`Button label`copied-label`string`'Copied!'`Label after copyingVue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbCopyButton } from './vendor/sb-copy-button';
app.component('SbCopyButton', SbCopyButton);
```

### Basic Usage

[](#basic-usage-1)

```

```

### With Code Block

[](#with-code-block-1)

```

    {{ command }}

const command = 'npm install @package/name';

```

### Custom Labels

[](#custom-labels)

```

```

### Share Link

[](#share-link)

```

const shareUrl = 'https://example.com/share/abc123';

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`text`StringrequiredText to copy`label`String`'Copy'`Default button text`copiedLabel`String`'Copied!'`Text after copying### Events

[](#events)

EventDescription`copied`Emitted when text is copiedFeatures
--------

[](#features)

- **One-click Copy**: Uses Clipboard API
- **Visual Feedback**: Changes label when copied
- **Reset**: Returns to original label after delay
- **Accessible**: Button with clear purpose

Styling
-------

[](#styling)

Uses Tailwind CSS:

- Gray button style
- Hover and focus states
- Icon (clipboard) included
- Success feedback

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Modern browser with Clipboard API

License
-------

[](#license)

MIT License

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance67

Regular maintenance activity

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

200d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193358540?v=4)[Mr Shane Barron](/maintainers/mrshanebarron)[@mrshanebarron](https://github.com/mrshanebarron)

---

Tags

laravelcopylivewirevueclipboard

### Embed Badge

![Health badge](/badges/mrshanebarron-copy-button/health.svg)

```
[![Health](https://phpackages.com/badges/mrshanebarron-copy-button/health.svg)](https://phpackages.com/packages/mrshanebarron-copy-button)
```

###  Alternatives

[livewire/flux

The official UI component library for Livewire.

9527.8M127](/packages/livewire-flux)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

211189.7k8](/packages/bezhansalleh-filament-google-analytics)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
