A modern approach to copy text to clipboard. No Flash. No frameworks. Just 3kb gzipped.

How To

  1. Step 1: Include LambdaEx Framework in Logi Info Application. Include LambdaEx Framework in Logi Info Application.
  2. Step 2: Click here to download Clipboard JS SourceClick here to download Clipboard JS Source


  • No flash file or framework
  • Customazible & extendable
  • Integration with Bootstrap Tooltips
Copy text from input
Cut text from input
Copy with bootstrap tooltip


If you don't want to modify your HTML, there's a pretty handy imperative API for you to use. All you need to do is declare a function, do your thing, and return a value.

target:For instance, if you want to dynamically set a target, you'll need to return a Node.
text:If you want to dynamically set a text, you'll return a String.
container:For use in Bootstrap Modals or with any other library that changes the focus you'll want to set the focused element as the container value.


destroyAlso, if you are working with single page apps, you may want to manage the lifecycle of the DOM more precisely. Here's how you clean up the events and objects that we create.
var clipboard = new Clipboard('.btn');


Show user feedback or capture what has been selected after a copy/cut operation.

successTriggered when the target is successfully copied.
errorTriggered when target cannot be found.
var clipboard = new Clipboard('.btn');
clipboard.on('success', function(e) {'Action:', e.action);'Text:', e.text);'Trigger:', e.trigger);


clipboard.on('error', function(e) {
   console.error('Action:', e.action);
   console.error('Trigger:', e.trigger);