0.8.4

CopyToClipboard

The CopyToClipboard component provides a button that copies specified text to the clipboard. It includes a visual feedback mechanism that shows a check icon for 3 seconds after successful copying.

Source code

Usage

---
import { CopyToClipboard } from '@yatoday/astro-ui/astro';
---

<CopyToClipboard text="Hello World!" />

Props

PropTypeDefaultDescription
variantdefault | primary | accent | destructive | outline | ghost | linkdefault-
sizedefault | sm | lg | icondefault-
classstring--