Copy button preview
Copy text with clear loading, success and retry feedback.
free · Essentials · primitive
When to use
- Use it when a product interface needs copy text with clear loading, success and retry feedback.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose tidal-button instead when press, loading, success and disabled states is the actual interface need, rather than copy button.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add https://tidalui.com/r/copy-button.jsonImport components/ui/tidal.css, components/ui/copy-button.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/copy-button.css";
import{TidalCopyButton}from"./components/ui/copy-button";
export default()=><div className="tidal-scope"><TidalCopyButton text="Copy this"/></div>;API and props
TidalCopyButton.clipboardTidalClipboardAdapter | undefinedOptional clipboard value accepted by this exported component.
TidalCopyButton.disabledboolean | undefinedOptional disabled value accepted by this exported component.
TidalCopyButton.feedbackDurationnumber | undefinedOptional feedback duration value accepted by this exported component.
TidalCopyButton.getText(() => string | Promise<string>) | undefinedOptional get text value accepted by this exported component.
TidalCopyButton.labelsPartial<TidalCopyButtonLabels> | undefinedOptional labels value accepted by this exported component.
TidalCopyButton.onCopy(ClipboardEventHandler<HTMLButtonElement> & ((value: string) => void)) | undefinedCallback invoked when the copy interaction is proposed.
TidalCopyButton.onCopyError((kind: TidalCopyErrorKind, error: unknown) => void) | undefinedCallback invoked when the copy error interaction is proposed.
TidalCopyButton.onStatusChange((status: TidalCopyStatus) => void) | undefinedCallback invoked when the status change interaction is proposed.
TidalCopyButton.textstring | undefinedOptional text value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Install the declared registry dependencies and render inside a tidal-scope with the foundation stylesheet loaded.