Skip to content
Calm motion: animations on this site only fade, with no movement

Indicator ​

Count or dot badge anchored on any element

A small square plate pinned to a corner of whatever it wraps: a count on an inbox button, a presence dot on an avatar. value as a number shows the count (max, default 99, turns 120 into "99+"). true shows a dot. 0 or false hides it. position names a physical corner and stays put in RTL, like every side-named prop. inline is on by default for icons and buttons. Turn it off to wrap a block.

Give it a label that says what the number means ("3 unread", "online"), and keep it in step with value. A status region that stays in the page reads it, so a change is announced in full ("4 unread", not "4"). This includes a change that appears from zero. Without a label, the badge is decorative and hidden from screen readers, because a bare "3" read after a button name means nothing. For a label that sits in the text rather than on a corner, use Badge.

Basic
3 unread120 alertsonline

Usage ​

ts
import { BlessIndicator } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
valuenumber | boolean—number → count badge, true → dot, falsy → hidden
maxnumber99
color"text" | "accent" | "danger" | "warning" | "success" | "info""text"
position"top-end" | "top-start" | "bottom-end" | "bottom-start""top-end"
inlinebooleantruewrapped element is inline (icon) vs block
labelstring—

Slots

NameScopeDescription
default—

Released under the MIT License. Character names and artwork belong to their owners.