Copy Button

A button that copies text to the clipboard.

Installation

npx shadcn@latest add https://shuip.xyz/r/copy-button.json

Preview

Examples

Default

With Custom Icons

Props

NameTypeDescription
valuestringThe text to copy to the clipboard.
copiedIconReact.ReactNodeThe icon to display when the text is copied.
notCopiedIconReact.ReactNodeThe icon to display when the text is not copied.
...propsReact.ComponentProps<"button">The props to pass to the button.