Skip to content

Copy Morph

A copy button where the icon outline morphs into a checkmark with a stroke and spring morph. It really copies the text with navigator.clipboard (with a fallback).

Plan
Free · MIT
Dependencies
React only
Props
8 (7 adjustable)

Free forever

MIT license, for personal and commercial projects. See installation

npx furin add copy-morph

Made with Furin: Pill Nav · Metal Button · Copy Morph

Props

PropTypeDefaultDescription
textstring"npx furin add copy-morph"Text copied to the clipboard.
labelstring"Copy"Button text at rest.
copiedLabelstring"Copied"Button text after copying.
errorLabelstring"Copy failed"Button text if the copy fails.
variant"field" | "button" | "icon""field""field" shows the text with the button beside it; "button" shows only the button; "icon" shows only the icon.
durationnumber1900Milliseconds the checkmark stays before reverting.
successColorstring"#6EE0A6"Color of the confirmation.
onCopy(text: string) => void""Called after a successful copy.

Installation

Install it

1Install the package

npm i furin-ui

2Import it

import { CopyMorph } from "furin-ui";

Also with pnpm add furin-ui, yarn add furin-ui or bun add furin-ui. Each component ships its own CSS and imports it for you.

Dependencies

React
18 or later
Other libraries
none
License
MIT

Each file ships its own CSS: there's nothing else to install.

Keep exploring

  • A button that narrows into a progress bar, advances at an uneven pace like a real network, and ends in a checkmark. With href, it really downloads the file.

    Buttons

  • A liquid-glass button that refracts the background behind it.

    Buttons

  • A dark button with a glint that sweeps across it every so often and on hover, lighting up the fill, the border and the text at once.

    Buttons