The space between states

An independent frontend demonstration exploring the parts of an API interaction that are easy to overlook: waiting, empty results, failure, and a useful way back.

  • React
  • TypeScript
  • Accessibility
Try the interactive demo

Start with the question.

A request is more than its successful response. Interfaces need to make sense while waiting, when there is nothing to show, and when something fails. This demo makes those states explicit and easy to inspect.

Make the choices deliberate.

  1. 01

    Model the interface with a TypeScript discriminated union so each request state has a clear shape.

  2. 02

    Use a local, simulated request to demonstrate each outcome without a backend, credentials, or a third-party API.

  3. 03

    Announce status changes to assistive technology and provide a retry path that preserves the selected scenario.

  4. 04

    Keep the state transition function independent of React so important behavior can be checked directly.

A working, useful starting point.

  • A working, browser-local demo with idle, loading, success, empty, and error states.
  • Keyboard-operable controls, status announcements, and a repeatable recovery path.
  • A reference implementation for an explicit request-state model; this is a learning demonstration, not a production authentication or API service.

The states in between.

A real, interactive demo with simulated data. Choose a scenario and see how the interface responds.

REQUEST PLAYGROUNDRuns locally in your browser

Give every state
a little thought.

Choose a sample response, then run the request to see the interface adapt.

RESPONSEidle

Ready when you are.

Run a sample request to get started.

Simulated data · No network requests · No credentials

Have something
in mind?

A thoughtful product.
A tricky frontend problem.
A conversation about the web.

Let’s talk