Skip to content

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: it is read from a status region that stays in the page, so a change is announced in full ("4 unread", not "4"), including one that appears from zero. Without one 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-right" | "top-left" | "bottom-right" | "bottom-left""top-right"
inlinebooleantruewrapped element is inline (icon) vs block
labelstring—

Slots

NameScopeDescription
default—

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