Skip to content
中文

Banner

A notice inside the page that says what happened and what to do next.

Demo

新版本可用更新后可以在夜间主题下使用印章。
已发布这条札记现在所有人可见。
存储空间快满了还能再存大约 20 条带图的札记。
Update availableThe new version adds the seal to the night theme.
PublishedEveryone can now see this note.
Storage is almost fullThere’s room for about 20 more notes with images.

Usage

.hao-banner holds a 20px icon and a run of text, with the title in <strong>. Tint classes: default (information), hao-banner--jade (success), hao-banner--amber (warning), hao-banner--seal (error). You provide the icon, the title, and the message.

  • Each tint has its fixed icon: hao-icon--info, hao-icon--success, hao-icon--warning, hao-icon--error. Icon and title carry the state together, not the background alone.
  • The title gives the outcome (“Published”); the message gives the effect or the next step. No apologies, no exclamation marks.
  • Use role="alert" for errors and role="status" for everything else.
  • At most one per screen; when several messages arrive, they take their turn.