Vibary.ai
← Vibe Coding

Comment Thread Expand

Replies unfold beneath a comment while the indent guide draws down beside them.

socialcalmminimalinteraction · finite · intermediate · ~0.5s
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.

308 lines · react + motion only
import { useState } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Comment Thread Expand
 *
 * Replies unfold beneath a comment. The container grows to its natural
 * height, the indent guide draws down beside it, and the replies arrive

About this pattern

Collapsed replies are a promise that opening them will not lose your place. The container grows to its natural height on a short eased tween, the indent guide draws downward from the parent avatar, and the replies arrive on a stagger just behind it — so the eye follows the guide to where the new content is instead of being handed a block that appeared from nowhere. Collapsing runs faster than expanding, because nobody needs to watch content leave.

Showing replies to a commentNested discussion threadsExpanding a review responseCollapsed issue conversation

Where it shows up

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

  • Priya Raman2hFinally got the trail loop under an hour. Four months of Tuesdays.
    12814
    Marcus Bell5hNew supplier signed. Same rate, twelve more months.
    423
    Comment thread

    A collapsed reply count opens in place with the indent rail beside it.

Related patterns