Patterns
Feedback
How to tell people something — what acts at once, what offers Undo and what is confirmed, empty versus loading versus failed, where errors go by scope, and how they are worded.
The wider the scope of a message, the further out it goes: an input's error sits under the input, a panel's problem under the panel header, a server's problem in the notification center. A message placed next to what it is about needs no explanation of where the problem is. Which component carries each kind of message is in Choosing a component.
When it applies
Every result, problem, empty view and wait that people need to know about.
Rules
Confirming
How far an action reaches decides whether it is confirmed, offered with Undo or neither (stdrc, 2026-10-29). Whether it waits for Save is a different question, decided by what the change is (Forms).
- Act at once when the person can reverse the action in the same place: Follow thread (Unfollow thread), Save message (Remove from Saved). Unfollow thread in a thread's own menu is one of these, since the thread stays on screen; the same Unfollow from a list, by any route, takes the row away, so it shows Undo. A question before an action that is one click to undo only slows people down.
- Offer Undo on every route to an action that takes an item out of the list: the menu, the button on the row and the swipe alike (Toast). Once the row is gone its way back is gone too, and an action that can be undone from one route and not from another can't be trusted from either.
- Apply a change to others that can be changed back, such as a role, when it is picked, and offer Undo. Confirm it only when people demote themselves, since they may lose the right to change it back, or turn off something others depend on, such as an AI provider their agents use; the dialog lists who is affected.
- Confirm before showing something to a wider audience, and say who will see it: "Anyone with the link can view it." Widening within the same server applies at once. Narrowing who can see something and unpublishing it share one confirmation, which lists who loses access, whichever route starts it.
- Confirm with a dialog any action that stops an agent's work, takes someone out of a place, or archives or deletes something, because none of these can be put back from where it happened: Stop agent, Restart or Reset, Archive agent, Leave channel, Remove member, Delete server (Dialog). The confirm button says the action's verb, and keeps the object when it can't be undone: Stop, Delete server (Writing).
- In a dialog that confirms something that cannot be undone, put the message in a red banner and make the confirm button red. Don't color the action in the menu that opens it: the warning belongs where the person commits, not in a list of choices. A danger zone, the actions set apart at the end of a page or a details panel, is the exception: its one action that can't be undone is red before the click, and the others warn in their confirmation; all are still confirmed (Forms, ListRow › An action's risk).
Empty, loading and failed
Keep these three apart:
- Don't show an empty state when loading failed. An empty state is a conclusion ("there is nothing here"); a failure is not. Raft Chat doesn't follow this everywhere yet (Raft Chat).
- When a filter hides everything, say so in the empty state ("No tasks match this filter") and how to get results back, so people don't conclude the list is empty.
- Give the skeleton the layout of the content it stands for, so nothing flashes or jumps when the content arrives: the same columns, the first item where it will be, the common row height. Don't imitate what only the data knows (group headings, how many lines each row wraps to, how many items there were last time); a list that lands a row or a few pixels off is fine. A skeleton that tries to look like the page reads as a strange copy of it, and the aim is only that the page doesn't jump (stdrc, 2026-11-14). Don't show one placeholder and then swap it for another. The same holds for everything around it: the first frame is already the settled one (Responsive layout).
- Show the skeleton only after the wait passes 1 second, the same as a spinner (Spinner): a load that finishes sooner goes straight from nothing to the content, without a skeleton flashing in between. Mark the region
aria-busyfrom the start: the container that stays when the content arrives, not the skeleton, which goes away before a screen reader could hear it finish. raft-ui doesn't delay aSpinneror a singleSkeletonfor you, since a spinner often sits inline or in a button, where starting at once is right. A list skeleton is only for a slow load, soInboxItemSkeletonListwaits 1 second by default; passdelay={0}to show it at once. - A list of flat rows loads as flat skeleton rows. Give the skeleton nothing the loaded list doesn't have: no border, card or background around a row, and no gap between rows the list doesn't have. A bordered card in place of a flat row is a different size and a different shape, so the list jumps when it arrives. Build skeleton rows from the row's own parts, which keep its padding and line heights:
InboxItemSkeletonfor InboxItem rows,ListRowSkeletonfor ListRow rows. Cards load as cards, such asTaskLoadingRowfor task cards (Tasks).
Errors, by scope
- Give every scope its own place, so an error shows where its cause is: an input, a dialog, a panel, the whole server.
- The prompt that invites a signed-out visitor on a public page to sign up is not feedback, and not a banner (Banner). A page's own state never takes its place.
- Use orange when something goes wrong, not red: red means something cannot be undone (Color).
- Say what happened, why, and what to do next, in plain words (Writing).
Progress
- Put progress inside the thing it belongs to, on its own thin track. Don't attach it to the edge of a rounded container; see Shape.
Related
- Actions and closing: when an action goes in a dialog, a banner or a toast, and how each one closes.
- States: the error and busy states of controls.
- Hand-offs and approvals: an agent that fails.