At rest it's a plain email link that works without JavaScript. Click it and the address flies into the To line of a letter that unfolds in place, with topic chips that start the message and a greeting already written. Send hands it to Gmail, Outlook or the mail app, or to your own handler. Then the letter folds into a Sent note and flies off.
npx shadcn@latest add https://clickworks.dev/r/compose-link.jsonThe files land in components/clickworks/compose-link/. No other packages are added.
import { ComposeLink } from "@/components/clickworks/compose-link/react/ComposeLink"
export function Contact() {
return <ComposeLink email="hello@yourstudio.com" person={{ name: "Sam", city: "Lisbon", timeZone: "Europe/Lisbon" }} />
}Where the letter goes.
Default "hello@example.com"
Who it's to. The name fills the greeting, and the time zone shows your local time.
Chips that fill in the subject and start the message. Up to five.
Every word on the letter, from the To label to the Sent note.
Auto follows the page (its background, data-theme or dark class), then the device.
Default "auto"
Colours for each theme.
Where the letter opens and which inboxes are offered. Drafts are kept between visits.
Send it yourself, for example to an API route. The letter then asks where to reply first.
The letter went out.
Your handler failed.
Colours come in through the light and dark props. The link takes linkFont and the letter takes cardFont, or both use your site's font.