Component

CopyButton

Copies a value to the clipboard with a transient confirmation state.

Install

Run the CLI to copy the source into your project.

pnpm dlx @stalk-ui/cli add @stalk-ui/copy-button

Examples

Live previews render through the docs app's PandaCSS codegen.

Theme
<CopyButton value="pnpm dlx @stalk-ui/cli add copy-button" />

Props

Public component props extracted from the source TypeScript types.

PropTypeRequiredDefaultDescription
`value``string`Yes-Text written to the clipboard.
`label``string`No-Visible/accessible label; omit for an icon-only button with aria-label.
`copiedLabel``string`No-Label swapped in while the copied state is active.
`timeout``number`No-How long the copied state lasts, in ms.

Variants

Variant axes exposed by the underlying PandaCSS recipe or slot recipe.

No recipe variants are documented for this component.

Registry

Files this component contributes to your registry install.

  • Manifest: `/r/copy-button.json`
  • Recipe: ``
  • Files: `src/components/ui/copy-button.tsx`