Vibary.ai
← Vibe Coding

Diff Suggestion Highlight

Changed lines wash in their green and red tints one after another, then the accept bar rises beneath them.

aiminimalcalmautomatic · finite · intermediate · ~0.8s
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.

332 lines · react + motion only
import { motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Diff Suggestion Highlight
 *
 * A proposed edit arriving in place: the changed lines wash in their
 * added and removed tints one after another, then the accept bar rises
 * under them.

About this pattern

A proposed edit landing inside the file it belongs to. The changed lines light up in reading order — a short green or red wash with an edge stripe drawn down the gutter — so the eye walks the change from top to bottom instead of meeting a wall of colour. Only the background and the edge carry the tint; the code keeps its own contrast, because a diff is read before it is judged. The accept bar arrives last and from below, so nothing destructive is under the cursor until the reader has seen what they would be agreeing to.

AI code suggestionProposed file editReview a generated patchInline refactor prompt

Where it shows up

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

  • Ridgeline
    Changes
    Commits
    Checks
    Files
    Conversation
    ChangesNew
    Brand refresh.figPriya Raman · 2.4 MB
    Q3 planning.pdfMarcus Bell · 840 KB
    Supplier contract.docxDana Whitfield · 96 KB
    Photography brief.mdNils Bergström · 12 KB
    Invoice 4821.pdfBilling · 64 KB
    Code review

    Suggested edits appear tinted in the editor with an accept and reject control attached.

Related patterns