»How to build a copy-to-clipboard HTML«
– by @cferdinandi
With JavaScript set HTML to easy use web GUI's.
📃 https://gomakethings.com/how-to-build-a-copy-to-clipboard-html-web-component/
#html #webdev #nojs #copypasta #copy #clipboard #easytouse #gui #homepage

How to build a copy-to-clipboard HTML Web Component
Yesterday, we looked at how to copy items to a user’s clipboard with JavaScriprt. Today, we’re going to turn that into an HTML Web Component. Let’s dig in! The Custom Element For this Web Component, let’s use a <copy-to-clipboard> element. <copy-to-clipboard> </copy-to-clipboard> With the HTML Web Component approach, we start with HTML and enhance it rather than rendering all the things with JavaScript. Let’s add a <button> with our desired text inside the custom element.