Vibary.ai
← Vibe Coding

Toast Slide In

A toast slides in from the edge, rests while a thin line counts down, then leaves the way it came.

feedbackminimalfriendlyautomatic · finite · starter · ~4.2s
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.

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

/**
 * Vibary · Toast Slide In
 *
 * A toast that slides in from the edge, rests while a thin progress
 * line runs out, then leaves the way it came.

About this pattern

Transient feedback that must not steal the cursor: an action succeeded, a job finished, an undo window is open. The panel travels in from the edge it is docked against, holds while a hairline progress bar runs out, then retreats faster than it arrived. The countdown line is the part most toasts skip, and it is the part that makes the toast feel fair — the user can see how long they have to hit Undo instead of guessing. Motion is translate-and-fade only, so the message text never deforms on the way in.

Changes savedUndo promptBackground job finishedSync error notice

Where it shows up

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

  • Ridgeline
    Inbox
    Starred
    Drafts
    Archive
    Sent
    InboxNew
    Contract renewalPriya Raman · 10:14
    Q3 hiring planMarcus Bell · 09:02
    Venue confirmed for ThursdayDana Whitfield · Tue
    Invoice 4821 clearedBilling · Tue
    Weekly summaryReports · Mon
    Inbox

    A transient bar that holds an undo window open, then withdraws unasked.

Related patterns