A small count (variant="count") or dot (variant="dot") that flags status or new items. Its label is announced, never shown.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For a small count or dot on something else: unread messages, a new item.
A status in words? Tag.
Every badge needs a label, which screen readers hear in place of the dot or number.
import { Badge } from '@idyeah/diya'Stable since 1.0.0
labelRequiredstringAccessible name, never shown: what the dot means, or what is counted, read after the number ("3 unread messages"). For visible text, use Tag.
variantRequired"count" | "dot"Required, so a Badge never guesses: 'count' shows count as a number; 'dot' is a small dot with no text.
countnumberWhole number shown by a 'count' badge; a count of 0 hides the badge unless showZero is set.
Default 0
maxnumberHighest number shown; larger counts show as '{max}+', such as '99+', while the accessible name keeps the real count. Defaults to 99.
Default 99
showZerobooleanKeeps a 'count' badge visible at 0.
Default false
size"small" | "medium" | "large"Badge size. Defaults to 'medium'.
Default 'medium'
toneToneColor meaning; see Tone. 'brand' follows the provider's brand color. Defaults to 'neutral'.
Default 'neutral'
Also takes every native <span> attribute, such as id, aria-* or data-*.