Dev Helpers

React / Async interaction

Deferred search indicator

Dev Helpers · October 7, 2026

A deferred search indicator distinguishes the current input from a slower result list. Keep previous results visible while showing that a newer value is pending.

Worked example

// components/DeferredSearchIndicator.tsx

import { useState, useDeferredValue } from "react";

export default function DeferredSearchIndicator() {
  const [q, set] = useState("");
  const result = useDeferredValue(q);
  return (
    <label>
      Filter
      <input value={q} onChange={(e) => set(e.target.value)} />
      <output aria-busy={q !== result}>{result}</output>
    </label>
  );
}

Implementation notes

Deferring a result view does not throttle network requests by itself. Treat rendering priority and request cancellation as separate concerns.

Try it yourself

Type several characters quickly and check which query the displayed list represents.

Open the React example →

Editorial date October 7, 2026 · Published December 6, 2026

Related articles

Percentage meter

A percentage meter needs both a bounded visual fill and a meaningful textual value. Handle a zero denominator before dividing.

Vertical typesetting sample

Vertical typesetting changes the reading direction and available inline space. Treat the sample text as content so it remains selectable and accessible.

Square cover crop

A square image crop gives a card grid consistent geometry. The crop anchor determines whether the most important part of a photo survives.