JSFiddle - React, Tailwind, and code Playground

HTML

<input id="trigger">
<button id="click" >CLICK TO PASTE</button>

JavaScript

$('#click').click(function(){
	navigator.clipboard.readText().then(text => {
  	// use text as a variable, here text = 'clipboard text'
		$('#trigger').val(text);
  });
});