Copy

The element is used to copy content of the data-sg-copy attribute on click to the clipboard. You just need to add the data attribute [data-sg-copy] to the element.

The following code examples shows how to use copy:

<p data-sg-copy="I was copied">Click Me</p>

The following list describe all data attributes.

  • [data-sg-copy] - required copy the value of the data attribute to clipboard after click on element

Basic Example:

Theme basic Screen size XL
html

Complex Example

This is sample implementation of different copy variants to show that you can put this attribute on literally anything and it will have copy behavior.

Theme basic Screen size XL
html