Skip to content
syntaqx

Components · Actions

Copy Button

The copy button from shadcn's docs as an installable component: built on Button, with a fallback where the Clipboard API is blocked, icon-only or labeled, and its own confirmation for 2s.

demo_key_7f3a9c2e1b4d

Installation

npx shadcn@latest add https://www.syntaqx.com/r/copy-button.json

Examples

Copy with confirmation

The button briefly becomes its own success state. No toast, no modal: the affordance and the feedback are the same element, which keeps the reader's eyes where their hands already are.

Inspired by GitHub

sk_test_4242424242424242