Component packs › Ditto › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
base | string | "https://studio.example/join/" | Base of the invite URL; a code is added. Default "https://studio.example/join/". |
code | string | "k7Qm2v" | The first code. Default "k7Qm2v". |
title | string | "Invite your team" | Heading. Default "Invite your team". |
note | string | Line under it. | |
onCopy | (url: string, ok: boolean) => void | ||
onNewLink | (url: string) => void | ||
dark | boolean | ||
autoplay | number | false | Showcase mode: copies, then makes a new link, every N ms. |
readonly url: stringcopy(): Promise<boolean>renew(): void: A new random code; the QR draws itself again.destroy(): voidimport InviteLink from './InviteLink';
<InviteLink />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Copy and share.