Vibary.ai
← Vibe Coding

Swipe to Reply

Dragging a message uncovers a reply mark that grows with the pull, snaps once at the threshold, and springs back.

socialfriendlypremiuminteraction · finite · advanced · ~0.6s
Interactive · click to play
Variant

The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.

400 lines · react + motion only
import { useRef, useState } from "react";
import {
  AnimatePresence,
  animate,
  motion,
  useMotionValue,
  useMotionValueEvent,
  useReducedMotion,

About this pattern

The gesture is the interface here, so nothing about it is pre-recorded: the mark's opacity, scale, turn and offset are all projections of how far the message has travelled, which means it sits exactly where the finger left it rather than where a timeline says it should be. Crossing the threshold does the one thing a projection cannot — it snaps, once, as feedback for passing a line you cannot see. Releasing rubber-bands the message home with an over-damped spring whether or not the reply was armed, because a message that boings past its resting place feels like a toy the second time you use it. What is left behind is the outcome rather than another animation of it: the composer opens a quoted line naming who is being answered, cancellable in one tap.

Reply to a message by swipingQuote a chat messageQuick action on a list rowThreaded reply in a conversation

Where it shows up

Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.

  • 10:15
    Dana Whitfieldonline
    Morning — did the venue confirm?
    They did, contract came back signed.10:14
    Are we still on for Thursday?
    Yes — booked the room for 2pm.10:14
    Perfect. I'll bring the printouts.
    See you then.10:14
    Message
    Chat thread

    Dragging a bubble sideways reveals a reply arrow and opens a quoted composer on release.

Related patterns