Component packs › Ditto › Invite Link

Invite Link

A real, scannable QR code draws itself, finder squares first; copy the link and it drops into the clipboard; a new link draws a fresh code.

Invite Link is a share from Ditto, a component pack with 6 copy and share controls: Copy and share where you see the copy happen: the text lifts off and drops into the clipboard. Price: $2 for the whole pack.

Built with: QR encoded in the browser, module-by-module draw, secure random codes.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Invite Link props

PropTypeDefaultDescription
basestring"https://studio.example/join/"Base of the invite URL; a code is added. Default "https://studio.example/join/".
codestring"k7Qm2v"The first code. Default "k7Qm2v".
titlestring"Invite your team"Heading. Default "Invite your team".
notestringLine under it.
onCopy(url: string, ok: boolean) => void
onNewLink(url: string) => void
darkboolean
autoplaynumber | falseShowcase mode: copies, then makes a new link, every N ms.

Methods on the ref

Use it in React

import InviteLink from './InviteLink';

<InviteLink />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Ditto

Good for: Copy and share.