Border radius
Use utilities like rounded-sm, rounded, or rounded-lg to apply different border radius sizes to an element.
var(--radius-xs)
var(--radius-s)
var(--radius-m)
var(--radius-l)
var(--radius-xl)
var(--radius-full)
Templates
Library
Use utilities like rounded-sm, rounded, or rounded-lg to apply different border radius sizes to an element.
Fade In
fade in up
fade in down
fade in left
fade in right
Zoom in
Zoom in
Wobble
Wobble
<script>
const copyButtons = document.querySelectorAll(".ds-copy");
copyButtons.forEach(function(button) {
// Store the original text of the button in an attribute
button.setAttribute("data-original-text", button.textContent);
button.addEventListener("click", function() {
// Create a new textarea element to copy the text to
const textarea = document.createElement("textarea");
textarea.value = button.textContent;
// Add a unique id to the textarea
textarea.id = "temporary-copy-textarea";
// Add the textarea element to the DOM
document.body.appendChild(textarea);
// Copy the content of the textarea element to the clipboard
textarea.select();
document.execCommand("copy");
// Remove the textarea element
document.body.removeChild(textarea);
// Show the message that the value has been copied in the button
button.textContent = "Copied!";
// Hide the message after one second and restore the original text of the button
setTimeout(function() {
button.textContent = button.getAttribute("data-original-text");
}, 2000);
});
});
</script>