185 Pro components and page blocks

Get Pro

Updated

Chain Copy

Preview

Customize

Icon and label
Soft
Medium
Success colour
Reset after1.6s
Radius12px

Installation

npx shadcn@latest add https://uibrik.com/r/chain-copy.json
Adds the files to components/uibrik/chain-copy and installs motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/chain-copy.

Usage

import { ChainCopy } from "@/components/uibrik/chain-copy/chain-copy";​<ChainCopy  label="Copy link"  copiedLabel="Copied"  text="https://example.com/invite/8f3k2"  display="label"  variant="soft"  size="md"  successColor="#16a34a"  resetAfter={1.6}  radius={12}  onCopy={(text) => {}}/>

Where to use Chain Copy

  • Share links

    The chain breaking and relinking says a link was taken, not just any text.

    Pairs with Share Menu and Popover

  • Invite links

    Team invites and referral links get a copy action people notice.

    Pairs with Invite Members

  • Docs anchors

    Heading permalinks copy with a small, satisfying beat.

Props

ChainCopy
label
Type string
"Copy link"
Button text.
copiedLabel
Type string
"Copied"
text
Type string
"https://example.com/invite/8f3k2"
Text written to the clipboard. Leave out to copy the page URL.
display
Type "label" | "icon"
"label"
Show the label, or the icon alone.
variant
Type "soft" | "ghost" | "solid"
"soft"
Button look.
size
Type "sm" | "md" | "lg"
"md"
Height, padding and text size.
successColor
Type string
"#16a34a"
Colour of the relinked chain and label.
resetAfter
Type number
1.6
How long Copied stays.
radius
Type number
12
Corner radius.
onCopy
Type (text: string) => void
–
Called after a successful copy.
className
Type string
–
Classes for the button.