Skip to content
Sign upGet access
MicrointeractionsShare foldMenu

Share fold

Sharing as folding a note: the card folds like a letter and shrinks into the link it became.

Share the conversation and its card folds in half like a letter, then shrinks into the copied link.

The conversation sits as a small card with its title and a line of what was said. Press Share and the card folds in half like a letter, its top half turning down over the bottom, then the folded note shrinks into the link it became, copied and ready to paste. The fold is the moment the conversation leaves your hands; the link stays as the receipt.

Installation

$ pnpm dlx shadcn@latest add https://chatcn.dev/r/share-fold.json

Usage

tsx
import { ShareFold } from "@/components/ui/chatcn/share-fold"

<ShareFold title="Fix session expiry" excerpt="The refresh token is read before the cookie is set." url={link} onShare={share} onReset={() => setLink(null)} />

Props

PropTypeNotes
title / excerptstringOn the card
urlstring | nullSetting it plays the fold
onShare() => voidMake the link and copy it
onReset() => voidBack to the card

Accessibility

  • The link line is a polite role="status", so Link copied is read once.

Motion

  • The fold is a 3D turn of the top half, 380 ms; the note then shrinks into the link. Reduced motion: it swaps.