Tailwind CSS Clipboard
Clipboard components are tools designed to facilitate the copying and pasting of data within an application. They ensure seamless data transfer and storage, enhancing user efficiency and interaction.
Requires Additional Installation
Note that this component requires the use of the third-party Clipboard plugin.
Installation
-
Install Clipboard
Install
clipboardvia npmTerminalnpm i clipboard -
Add the Clipboard JavaScript
Include the JavaScript
<script>near the end of your</body>tag:HTML -
Add the Preline Helper JavaScript
Include the JavaScript
<script>after thehelper-clipboard.jsfile.HTML
Clipboard with tooltip
Show clipboard feedback in a tooltip after the copy action succeeds.
Customize the tooltip message shown after copying.
Clipboard in modal
Use clipboard actions inside a modal without changing the interaction pattern.