Swipe reply Pro
One payment, every Pro piece. $10 tomorrow.
Install
npx shadcn@latest add @mu-pro/swipe-replyPro. Installs with your licence key through the @mu-pro registry; the key comes with Pro. Lands in components/mu/swipe-reply/ with the shared foundation.
Usage
import { SwipeReply } from "@/components/mu/swipe-reply/SwipeReply";
<SwipeReply author="Kitsu" composer="composer" onReply={setReplying}>
Can you send me the deck?
</SwipeReply>Source
How it works
Building with an agent? Hand it a ready prompt for this piece.
Input and reduced motion
- Pointer / touch: drag the message sideways, toward the middle of the thread. It tracks the finger exactly up to the line, then gives. Past the line the arrow turns mint; let go to reply. Drag back under the line, press Escape, or move up or down (the page scrolls) to cancel: it springs home.
- Keyboard: Tab reaches the Reply key beside the message (it shows on focus at once, and on hover after a short wait); Enter or Space replies, and focus stays on the key.
- Reduced motion: no stretch and no bud travel: the bud and arrow appear in place as you drag, the message jumps home, and the quote arrives at once.
- Your composer should reserve the quote's slot, so the field never jumps when it arrives.
Props
| Prop | Default | What it does |
|---|---|---|
children | — | any content | the message: its words, a link, an emoji |
onReply | — | (quote) => unknown | called with { author, text } when a swipe passes the line, or Reply is pressed |
quote | the message's text | string | the words carried into the quote |
author | — | string | handed back with the quote, for "Replying to Kitsu" |
threshold | 64 | px | how far to drag before letting go replies |
side | "start" | "start", "end" | theirs (start) swipes toward the end; yours (end) toward the start, in the mint wash |
composer | — | an element id | the quote drop falls into this element's top edge |
labels | { reply: "Reply" } | — | the Reply key's name, for translation |
disabled | false | — | no swipe, and the key does nothing |
sound | off | true or 0–1 | a key as the arrow arms, a swish as the quote leaves |
className | — | — | added to the root |
Sound
None. It loads in silence.
Off unless you pass sound (true, or a volume 0–1). A key plays the moment the arrow arms under your finger (or Reply is pressed), and a swish as the quote leaves; never on hover, on mount or from a prop change. setMuted(true) from components/mu/sounds.ts silences every cottoncandy item at once.
Licence
Included with Pro: use it in unlimited end products for you and your clients; no reselling as a kit. See the licence.
Drag a message aside: a reply arrow buds from its tail, and letting go carries a quote of it down into your composer.
For chat apps with quick repliesMore in Messaging