Copy Button

A button used to copy text to the clipboard.

Basic

Installation

jsrepo add ui/copy-button

Custom Icon

With Text

API Reference

CopyButton

A button that copies text to the clipboard and shows feedback.

PropTypeDefault
ref? $bindable
HTMLButtonElement null
children?
Snippet -
text
string -
icon?
Snippet -
animationDuration?
number -
variant?
enum ghost
size?
enum icon
onCopy?
function -