Raft Design System

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).

The actionDo
Affects only the person, and its way back stays in place: Follow thread, Save messageAct at once, with no dialog and no toast
Affects only the person, and takes an item out of the list it is in: Done, Unfollow, CloseAct, and show a toast with Undo
Affects others and can be changed back: a member's role, an agent removed from a thread's followers (it only stops following)Act, and show a toast with Undo
Shows something to a wider audience: making an Artifact or a server publicConfirm
Stops work, takes someone out of a place (Leave channel, Remove member) or narrows who can see something, makes a link or key others hold stop working, archives or deletesConfirm
  • 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:

SituationShow
There is nothing hereAn empty state (EmptyState): a gray icon, a title, at most one helper sentence (a way out, or a consequence the title doesn't say), and at most one button
It is loadingA skeleton with the layout of the content, such as task cards or conversation rows (Skeleton); the other indicators are in Choosing a component
It failed to loadAn orange banner where the content would be, which says what happened and offers Retry (Banner)
empty-state/compositions/default
  • 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-busy from 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 a Spinner or a single Skeleton for 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, so InboxItemSkeletonList waits 1 second by default; pass delay={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: InboxItemSkeleton for InboxItem rows, ListRowSkeleton for ListRow rows. Cards load as cards, such as TaskLoadingRow for task cards (Tasks).

Errors, by scope

ScopeWhere the error goes
One inputUnder the input; see Forms
A dialog or a formAn orange banner inside it (Banner)
One panel: an agent won't start, a setting of the conversation didn't saveA full-width notice under the panel header (PanelNotice, Panel), with a line-seam above and below: it is a region of the panel, not a banner inside its content. Give it a × when the person can dismiss it, and an action when there is a next step, such as View logs
A one-off action that failed and has no place of its own: a copy blocked by the browser, a thread that is no longer availableA warning toast, led by its TriangleAlert icon (Toast)
The whole serverThe notification center (NotificationCenter)
The whole app: a new version is outThe Update button in the top bar, before who is working (The web top bar). Where there is no top bar (a phone, the web under 768px), a banner in the toast's place, above the composer or the tab bar, with Dismiss and Update; toasts stack above it. The web app also applies the new version by itself when nothing can be lost and the desktop app installs it on quit; either shows that banner on a desktop only after a day without the update (The web top bar). Never a strip floating over the top of the page
  • 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.