EmptyState is what a screen says when it has nothing to show: a symbol, a title, one sentence naming the next step, and optionally a button. It is a platform part, imported from exact:content; its source is in the Exact framework (content.contract L143-L172), which models it on UIKit's content-unavailable view.
Used by
Screen | State | Symbol | Title | Message | Button | Line |
|---|---|---|---|---|---|---|
No identity, or the service is not available for it |
| "No identity selected" | "Choose or create an identity in Me to see its replies and mentions." | "Open Me", | ||
Loaded, no notifications, no error |
| "Nothing yet" | "Replies and mentions for your identities show up here." | "Refresh", plain | ||
The transcript is empty |
| "New chat" | "Say something to start this conversation." | none |
Props and slot
Anatomy
Read from the framework source: a scroller that fills the space it is given, with one centred column inside it, padded 48 points above and below and 24 at the sides, text centred. The symbol has 15 points under it, the message sits 3 points under the title and is at most 22.5rem wide, and the buttons sit 20 points under the message in a centred row that wraps.
Two behaviours come with the part. At the accessibility text sizes it drops the symbol, as UIKit does. When it is taller than its space it scrolls from the top instead of being cut off.
The app wraps it differently per screen. On Activity it is inside a scroll with 24 points of padding, so the large title and pull to refresh keep working. On the session it is inside a column with justify-content="center", between the bar and the composer.
The rule: whole screen or row
DESIGN.md states it in one sentence: "Empty states inside a grouped list are a row (headline + secondary sentence) followed by the action rows; a whole-screen empty state (nothing else on screen) is EmptyState."
Situation | Use | Examples |
|---|---|---|
Nothing else is on the screen | EmptyState, in place of the list | The three calls above |
The screen still has other sections or actions | A row inside the list: | "No identity yet" on Me, "Choose an identity" and "No agents yet" on the Agents list, "No identities yet" on Vault |
A sub-list inside content is empty | One quiet line of secondary text | "No comments yet. Start the conversation." in DiscussSection, "No conversations yet. Start one to talk to this agent." on Agent detail |
This is why me.contract imports EmptyState and never calls it: Me always shows its Connections and About sections, so its empty state is a row.
One screen does not follow the rule. The Compose comment sheet, with no identity, shows a hand-built centred column (a symbol:person, "Create an identity to reply.", a sentence and a filled "Create an identity" button, discuss.contract L269-L275) instead of EmptyState. It is the same idea with different type and a different button style.
Rules for use
The title names the state in two or three words. The message says what to do next, in one sentence (Voice and wording).
Indent the button under the call. Written after it, the button lands at the bottom of the screen, far from the message (an Exact pitfall).
Use bordered for a button that leaves the screen ("Open Me") and a plain button for a retry ("Refresh"). See Buttons and actions.
Give it the whole space under the navigation bar. Do not put it in a section.
Loading and failure are not empty: use progress and StatusLine.
Why it looks this way
Principle 4 of DESIGN.md, "Honest state", requires "an empty state that names the next step (EmptyState from exact:content)" (Honest state). The look is the platform's, so an empty Activity tab reads like an empty Mail or Notes screen (Leave it unsaid). The older screenshot activity/ios-empty-light.png shows the same part before the brand tint was applied, with the "Refresh" button in system blue.
User stories
This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).
US-ACT-01 See replies and mentions for my identity: "No identity selected" and "Nothing yet"
US-AGENT-05 Chat with an agent: New chat, before the first message
US-APP-04 Use the app with large text and assistive technology: Drops its symbol at accessibility text sizes
US-APP-05 Always know what is happening: The whole-screen empty state and the rule against using it in a list
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime