Button
A clear, responsive action with quiet secondary states.
Copy a value with immediate confirmation.
npx shadcn@latest add @silicon-ui/copy-buttonnpx shadcn@latest add @silicon-ui/copy-buttonInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/copy-button/copy-button.tsxcomponents/silicon-ui/copy-button/copy-button.module.csscomponents/silicon-ui/lib/use-copy-feedback.ts sharedInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
value* | string | — |
label | string | "Copy" |
className | string | — |
iconOnly | boolean | false |
variant | "outline" | "plain" | "outline" |
disabled | boolean | — |
onCopied | () => void | — |