@cdr-kit/react-ui/DX primitives/CopyButton

<CopyButton>

Minimal copy-to-clipboard control. Flashes a check icon for 1.4s on success. Composes inside other primitives (e.g. <ShortAddress>).
import { CopyButton } from "@cdr-kit/react-ui"

Live preview

sample value
import { CopyButton } from "@cdr-kit/react-ui";

<CopyButton value="0xac592f165D8dD1f27A087bdB39c0b2f619FF6C8C" />

Props

PropTypeDefaultDescription
valuerequiredstringText written to the clipboard on click.
labelstring"copy"ARIA label for the button.
classNamestringCustom class — defaults to none; style via the wrapping chip.