npx shadcn@latest add https://ui.doras.to/r/clipboard.jsonContains all root functionality.
| Prop | Type | Default |
|---|---|---|
textToCopy* | string | - |
children | React.ReactNode | - |
className | string | - |
iconSize | number | 16 |
copiedDuration | number | 1500 |
tooltipText | string | "Click to copy" |
tooltipCopiedText | string | "Copied!" |
showTooltip | boolean | true |
copyIcon | React.ReactNode | <Copy /> |
checkIcon | React.ReactNode | <Check /> |
checkIconClassName | string | - |
copyIconClassName | string | - |
onCopy | () => void | - |
onError | (error: Error) => void | - |
tooltipDelayDuration | number | 0 |
disabled | boolean | false |
You can use your own button as a child component for more control and styling abilities
The raw component