SClipboardCopyComponent
This component represent a simple "copy to clipboard" component that will copy a "from" target when clicked.
Preview
Copy from an input
Loading code example. Please wait...
Using the input container addon
Loading code example. Please wait...
Copy from a paragraph
Hello world
Hello world
Loading code example. Please wait...
Features
-
Copy to clipboard
-
Specify a "from" target to copy using a simple css selector
-
Default icons for "copy", "copied" and "error"
Import
Install
Interface
-
fromString
Specify the element you want to copy from with a simple css selector. Try to get "value" first, then "innerHTML"
-
successTimeout1500Number
Specify the duration for displaying the "success" icon
-
errorTimeout3000Number
Specify the duration for displaying the "error" icon