Command Palette

Search for a command to run...

Docs
Copy-to-clipboard

Copy-to-clipboard

Component that wraps any children with copy to clipboard functionality and a tooltip.

Installation

pnpm dlx shadcn@latest add "https://akasha-ui.pages.dev/r/styles/default/copy-to-clipboard.json"

Usage

import { CopyToClipboard } from "<path-to-ui-components>/copy-to-clipboard";
<CopyToClipboard
  textToCopy="0x8a022905463998860516390fb27548479a098b95"
  ctaText="Copy address"
  successText="Copied ✓"
>
  <p>Click here to copy</p>
</CopyToClipboard>

Props

NameTypeDescription
textToCopystringText to copy.
ctaTextstringCall to action text.
successTextstringSuccess message to display once text is copied.
resetDurationnumberDuration in milliseconds before success message is reset.