Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Copy Button

Copy Button Laravel Package

mrshanebarron/copy-button

mrshanebarron/copy-button is a Laravel Blade package for adding one-click copy-to-clipboard buttons to your views. Use it to let users copy text, links, or code snippets with minimal setup and adjustable styling, while avoiding custom JavaScript for common clipboard actions.

View on GitHub
Deep Wiki
Context7

Copy Button

mrshanebarron/copy-button is a lightweight Laravel package that adds a reusable Blade copy-to-clipboard button to your views. Drop the component into any template, point it at text or a target element, and give users a one-click way to copy values such as API keys, URLs, or code snippets.

  • Reusable Blade component
  • Copy static text or another element’s content
  • Modern Clipboard API with graceful fallback
  • Customizable label, icon, and CSS classes
  • Minimal JavaScript footprint
Frequently asked questions about Copy Button
What is mrshanebarron/copy-button used for in Laravel?
It provides a reusable Blade copy-to-clipboard button component for Laravel views. You can use it to let users copy text, code snippets, or values without building a custom button each time. It is aimed at docs, dashboards, and code examples where quick copying is useful.
How do I install mrshanebarron/copy-button in a Laravel app?
Install it with Composer using the package name mrshanebarron/copy-button. Then follow the repository README for any Laravel service provider registration, asset publishing, or component setup steps. Because setup details can change between releases, the README and composer.json are the authoritative source.
Does this package provide a Blade component for copy buttons?
Yes. The package is described as a Laravel UI component package that provides a reusable Blade copy-to-clipboard button component. That means you can include it in Blade views instead of writing the button markup and clipboard behavior yourself. Check the README for the exact component tag and supported attributes.
Which Laravel versions are supported by mrshanebarron/copy-button?
The provided overview does not list specific Laravel version constraints. Check the package composer.json and README for the supported PHP and Laravel versions before installing. That is especially important if you are upgrading an existing Laravel application.
Do I need npm or a JavaScript build step to use the copy button?
The package is presented as a Blade UI component, so the main integration is in your Laravel views. The README should be checked for whether it ships prebuilt assets, requires asset publishing, or relies on browser clipboard APIs. Do not assume an npm build step is required without confirming the package setup.
Can I customize the copied text or button appearance?
The package blurb says it is simple to customize, so you can adapt it for different copy values and view contexts. The exact props, slots, and CSS hooks are not listed in the provided overview. Review the README or component source for the supported customization options.
How can I test the copy-button component in Laravel?
You can render the Blade component in a feature test and assert that the expected button markup appears in the response. The actual clipboard action happens in the browser, so verify it with a browser test or manual check if that behavior matters. Keep tests focused on your rendered values and attributes rather than the browser clipboard implementation.
Is mrshanebarron/copy-button suitable for production Laravel apps?
It is a small UI component package intended to add copy buttons to views, so it can be suitable for production when its requirements match your app. Review the README, release history, and composer constraints before relying on it. As with any dependency, test the component in your target Laravel version and browser environment.
What are alternatives to mrshanebarron/copy-button?
You can build a copy button with the browser Clipboard API and plain JavaScript or Alpine.js in your Blade views. Livewire components or other Laravel UI packages can also provide copy-to-clipboard behavior. Choose the package if you want a ready-made Blade component and minimal setup.
Is mrshanebarron/copy-button actively maintained?
The provided context does not include release history or maintenance status. Check the GitHub repository for recent commits, tagged releases, and open issues before adopting it. A quick review of composer.json and the README will also show whether it fits your dependency policy.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator