Vibary.ai
← Vibe Coding

Background Refresh Hint

A two-pixel tinted band travels the panel's top edge while data refetches, without interrupting reading.

loadingsubtlecalmautomatic · finite · starter · ~2.4s
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.

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

/**
 * Vibary · Background Refresh Hint
 *
 * Data is being refetched under content someone is already reading. The

About this pattern

Cached content is on screen and being read; a refetch is in flight behind it. The wrong answer is to dim the panel or replace it with a waiting state, because the content is still true. Instead the entire indicator lives in a two-pixel strip along the top edge, inside the panel's own rounding, where a tinted band travels from side to side. Content keeps full opacity, nothing is disabled, and `aria-busy` carries the same fact the band does. When the fetch lands the band retires and the timestamp crossfades to 'just now' inside a reserved box, so the header never shifts. Nothing springs here — a hint that overshoots is asking to be looked at, which is the opposite of the job.

Polling a feedRevalidating cached dataLive inboxAuto-refreshing table view

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

    The list stays readable while new mail is fetched behind it.

Related patterns