# Indicator

A dot or count bubble on a corner of an avatar, icon button or any other element.

Import from `@a31labs/rax/indicator`.

## Usage

```tsx
<Indicator label={unread} disabled={!unread}><IconButton label={`Notifications, ${unread} unread`} icon={<Bell aria-hidden />} /></Indicator>
<Indicator tone="ok" position="bottom-end" srLabel="Online"><Avatar name="Ada Lovelace" /></Indicator>
```

## Rules

Props: `label` (a count or short text in a bubble; leave it out for a dot), `tone` (`accent` default | `ok` | `warn` | `danger` | `info`), `position` (`top-end` default | `top-start` | `bottom-end` | `bottom-start`), `pulse`, `max` (default 99, shown as "99+"), `disabled` (hides the mark), `srLabel`. The mark sits on a corner of its child with a 2px surface ring and is aria-hidden. Its meaning goes in `srLabel` when the child is not interactive (an Avatar), and in the child's own label when it is ("Notifications, 3 unread" on the IconButton), because focus only announces the button's name. `label={0}` shows a 0; pass no label to hide the count. `pulse` pings four times for something that just changed, and never under reduced motion.

Page: https://rax.a31.at/components/indicator
