How an App Answers a Tap

How should an app respond to a user action with visual, haptic or optimistic feedback? Show some response within 100ms to every tap, use optimistic updates for low-risk actions, use haptics only when a state is confirmed, and offer undo instead of confirm dialogs.

This is how an app replies to what the user did. You decide whether to answer with screen, vibration or sound, and how loudly.

Terms and previews

Tap a preview to pause it; tap again to play.

  1. Visual feedback

    Signals with a change in color or shape

  2. Haptic feedback

    A short vibration. Comes in types such as success, warning and selection

  3. Optimistic UI

    Shows the result before the server replies, and rolls back if it fails

  4. Loading button

    Shows progress inside the pressed button and blocks repeat clicks

  5. Undo instead of confirm

    Offers undo after deleting, instead of asking "Are you sure?"

How to use it

  • Show some response to every tap within 100ms. Without one, people tap again.
  • For actions that rarely fail, like Like or Save, apply the result right away with optimistic updates.
  • Use haptics only at the moment a state is confirmed, such as a switch flip, a refresh finishing or a successful payment.
  • When you hand code to an AI, using these names gets a much more accurate result than "give some response when tapped".

Prompts to copy

Like button

Build a Like button with Optimistic UI.
- On tap, fill the heart immediately and add 1 to the count. The icon animates scale 1 -> 1.2 -> 1 (250ms).
- If the server request fails, revert and show a "Couldn't save your like" toast.
- On mobile, play one light haptic (light impact) on success.
- Even if tapped repeatedly, send only one request.

Source posts: @davidm_ai

All cards (27)