Copies text to the clipboard and morphs the icon to a check or an error mark. The swap is instant when reduced motion is requested.
npx shadcn@latest add https://raw.githubusercontent.com/lukemeno/animlets/main/public/r/copy-button.json
copy-button