Skip to content
中文

Empty stateEmptyState

What a region shows when it has nothing to display: a vignette inside a round window, one line on the state of things, one line on the next step.

Demo

还没有札记

写下第一条,它会出现在这里。

没有找到「立春」

换一个词试试,或者看看全部札记。

没连上网络

已有的札记还能看,新的修改会在连上后同步。

今天的都做完了

没有待办了,歇一会儿。

没能载入

出了点问题,不是你的操作造成的。

No notes yet

Write your first one and it will show up here.

No results for “spring”

Try another word, or browse all notes.

Can’t reach the network

You can still read your notes. New changes will sync when you’re back online.

All done for today

Nothing left to do. Take a break.

Couldn’t load this

Something went wrong, and it wasn’t anything you did.

Usage

.hao-empty holds, in order, a .hao-scene, .hao-empty__title (Song typeface), .hao-empty__body, and an optional button. You provide the words; the vignette comes from the five below.

Five vignettes, one per situation

VignetteWhat it showsUse it for
MoonA moon hanging over the waterA first visit—nothing here yet
BoatA lone boat below distant hillsA search or filter with no results
MountainsTwo ranges of far hills with mist betweenOffline, out of reach
PavilionAn empty pavilionAll done; time to rest
LanternA carried lanternSomething failed; it didn’t load
  • Each vignette is drawn inside a round window, like looking out through a moon gate. The subject is fine tint lines; the far scenery and the water are washes in pattern—two colors, no more.
  • The vignette is the scene of that screen (see the three rules in the guide): no pattern or display piece elsewhere on the same screen, and no seal.
  • One vignette per situation, fixed across the whole product—don’t trade them by mood, and add no new vignettes.
  • The default size is 96px; a whole-page empty state uses hao-scene--lg (160px). The vignette is decoration: add aria-hidden="true".
  • The title states where things stand, the message says the next step, and the button is that step. “All done” needs no button.
  • A first run gets the primary button; every other situation gets hao-btn--tinted. When a search brings no results, put the words that were searched into the title.
  • No playful lines like “Oh dear” or “Nothing here at all”, and no exclamation marks. When something goes wrong, make clear it isn’t the user’s fault.
  • When one block fails to load and the rest of the page stands, use a banner; the lantern is only for a page with no content at all.