PHPackages                             sixlive/nova-text-copy-field - 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. sixlive/nova-text-copy-field

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

sixlive/nova-text-copy-field
============================

Laravel Nova text field with click to copy support

v1.5.0(7y ago)70723.2k↓55.7%15[7 issues](https://github.com/sixlive/nova-text-copy-field/issues)[1 PRs](https://github.com/sixlive/nova-text-copy-field/pulls)2MITVuePHP &gt;=7.1.0

Since Oct 9Pushed 6y ago3 watchersCompare

[ Source](https://github.com/sixlive/nova-text-copy-field)[ Packagist](https://packagist.org/packages/sixlive/nova-text-copy-field)[ Docs](https://github.com/sixlive/nova-text-copy-field)[ RSS](/packages/sixlive-nova-text-copy-field/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (1)Versions (12)Used By (2)

Nova Text Copy Field
====================

[](#nova-text-copy-field)

[![Packagist Version](https://camo.githubusercontent.com/3e84af99cade7db47f605c289b25a782c31e848069a56e8c5cdacf967adedd70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7369786c6976652f6e6f76612d746578742d636f70792d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sixlive/nova-text-copy-field)[![Packagist Downloads](https://camo.githubusercontent.com/7bb5c134158d998cea2756c3641ca73080974562ba890277f744ac53e2387f41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7369786c6976652f6e6f76612d746578742d636f70792d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sixlive/nova-text-copy-field)[![StyleCI](https://camo.githubusercontent.com/87a809b86f1217cc6f3d39148bcc649d3cf18323ab2515d93a59ac43a90d74e2/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3135323132343639322f736869656c64)](https://github.styleci.io/repos/152124692)

A Laravel Nova text field with click to copy support. This field behaves just like a text field but adds the ability to copy the field value to your clipboard with just a click.

This package can also be found on [Nova Packages](https://novapackages.com/packages/sixlive/nova-text-copy-field).

[![animated screenshot](.docs/animated.gif)](.docs/animated.gif)

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

[](#installation)

```
> composer require sixlive/nova-text-copy-field
```

Usage
-----

[](#usage)

Add the field to a resource.

```
use Sixlive\TextCopy\TextCopy;

public function fields(Request $request)
{
    return [
        TextCopy::make('Example Copy Field', 'example_copy_field'),
    ];
}
```

### Truncating long strings

[](#truncating-long-strings)

In some cases you may want to truncate the display of a fields value but allow still copy the full value. You can use the `truncate()` method to accomplish this.

```
TextCopy::make('Some Long Field')
    ->truncate(100)
```

### Masking the field value

[](#masking-the-field-value)

This works great for secrets like API Keys.

```
TextCopy::make('Some Secret String', 'some_secret_string')
    ->mask('❌') // default '*'
    ->truncate(5)
```

### Copy button title

[](#copy-button-title)

The title of the copy button defaults to the field name prefixed with 'Copy'. For example, `TextCopy::make('Some Field', 'some_field')` the button title will be "Copy Some Field".

If you would like to manually set the title you can use the `copyButtonTitle()` method.

```
TextCopy::make('Some Field', 'some_field')
    ->copyButtonTitle('Some alternative title')
```

### Alternative copy value

[](#alternative-copy-value)

You can choose to mutate and that is copied to the users clipboard. You can either pass a value or a Closure.

```
TextCopy::make('Some Secret String', 'some_long_string')
    ->copyValue(function ($value) {
        return substr($value, -6);
    })
```

or

```
TextCopy::make('Some Secret String', 'some_long_string')
    ->copyValue('some fixed copy value')
```

### Only displaying the button on hover

[](#only-displaying-the-button-on-hover)

```
TextCopy::make('Some Secret String', 'some_long_string')
    ->showButtonOnlyOnHover()
```

Screenshots
-----------

[](#screenshots)

### Default State

[](#default-state)

[![default](.docs/default.png)](.docs/default.png)[![default](.docs/index.png)](.docs/index.png)

### Success State

[](#success-state)

When the field value has been successfully copied to the user's clipboard. [![success](.docs/success.png)](.docs/success.png)

### Error State

[](#error-state)

When there is an error adding the field value to the user's clipboard. [![error](.docs/error.png)](.docs/error.png)

### Truncated Display Value

[](#truncated-display-value)

[![truncated display](.docs/truncated-screenshot.png)](.docs/truncated-screenshot.png)

### Masked Display Value

[](#masked-display-value)

[![masked display](.docs/masked-screenshot.png)](.docs/masked-screenshot.png)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Code Style
----------

[](#code-style)

StyleCI will apply the [Laravel preset](https://docs.styleci.io/presets#laravel).

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [TJ Miller](https://github.com/sixlive)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

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 ~18 days

Total

9

Last Release

2679d ago

Major Versions

v0.2.0 → v1.0.02018-10-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5108034?v=4)[TJ Miller](/maintainers/sixlive)[@sixlive](https://github.com/sixlive)

---

Top Contributors

[![sixlive](https://avatars.githubusercontent.com/u/5108034?v=4)](https://github.com/sixlive "sixlive (30 commits)")[![mattdfloyd](https://avatars.githubusercontent.com/u/185187?v=4)](https://github.com/mattdfloyd "mattdfloyd (1 commits)")[![tnorthcutt](https://avatars.githubusercontent.com/u/796639?v=4)](https://github.com/tnorthcutt "tnorthcutt (1 commits)")

---

Tags

laravelnovaphplaravelnova

### Embed Badge

![Health badge](/badges/sixlive-nova-text-copy-field/health.svg)

```
[![Health](https://phpackages.com/badges/sixlive-nova-text-copy-field/health.svg)](https://phpackages.com/packages/sixlive-nova-text-copy-field)
```

###  Alternatives

[ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

6163.5M22](/packages/ebess-advanced-nova-media-library)[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2852.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2862.1M9](/packages/outl1ne-nova-sortable)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[advoor/nova-editor-js

A Laravel Nova field bringing EditorJs magic to Nova.

92219.3k3](/packages/advoor-nova-editor-js)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17947.0k](/packages/outl1ne-nova-page-manager)

PHPackages © 2026

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