Clipboard

Singleton that copies text to the clipboard using the Clipboard API, with a document.execCommand fallback

Live preview

Open in new tab ↗
  • It works as singleton
  • Uses navigator.clipboard.writeText() or document.execCommand('copy') as fallback

Methods:

  • SETTER('clipboard/copy', 'TEXT TO CLIPBOARD') or FIND('clipboard').copy('TEXT TO CLIPBOARD')

Configuration:

  • oncopy {String} a link to the function(value)
  • native {Boolean} enables native clipboard (default: false)

More UI components

Browse all 348