design-infraGitHub
Report a problem or share feedback← Catalog

Button Copy

curatedtheme-awarefree

smoothui/button-copy

A ButtonCopy component for SmoothUI.

press · state — subtledrop-inRefinedTechnical
$npx shadcn@latest add @smoothui/button-copy

npm deps: motion, lucide-react

Our notes

Copy button that cycles idle → spinner → check with icon cross-fades, an aria-live status and a 44px hit target; icons are props. bg-background + border, spinner has motion-reduce:animate-none. Its className is string-concatenated (no cn()), so conflicting utility classes won't merge — override via a wrapper if needed.
Source
SmoothUI
Kind
component
Categories
button
Use as
drop-in — replaces your component
Applies to
buttoncode
Motion
on press, state · subtle · motion · medium cost · respects reduced motion
Tags
button, copy, clipboard, feedback, icon-swap, spring, complexity-low, reduced-motion
Licence
MIT ("MIT License — Copyright (c) 2024 Eduardo Calvo", github.com/educlopez/smoothui).
Live demo
smoothui.dev
Docs
smoothui.dev