---
title: "Indicator"
description: "Puts a count or a dot on the corner of a button or a tab, to say that something new waits there. Large counts show as 99+."
url: https://gelatinui.com/components/indicator
markdown_url: https://gelatinui.com/components/indicator.md
access: free
install: "npx shadcn@latest add @gelatin-ui/indicator"
registry_item: https://gelatinui.com/r/indicator.json
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Indicator

> Puts a count or a dot on the corner of a button or a tab, to say that something new waits there. Large counts show as 99+.

Page: https://gelatinui.com/components/indicator

## When to use it

Best for: A count or a dot on the corner of a control that says new items wait there.

- Wrap one host in `Indicator` and put `IndicatorBadge` or `IndicatorDot` inside the host, so the mark joins its name.
- Use `IndicatorBadge count` for a number, and `IndicatorDot` for news with no number.
- Use `IndicatorDot shown` for news that comes and goes while the page is open.

## When not to use it

- For a label or a status next to text, use a [Badge](https://gelatinui.com/components/badge.md).
- For a status mark on a person, use an [Avatar](https://gelatinui.com/components/avatar.md).

## Notes for agents

- A count of 0 hides the badge unless `showZero`; over `max` (default 99) it shows "99+".
- The digits follow `locale` and `format`; `formatOverflow` sets another form of the cap.
- `side` is logical: `top-end` (default), `bottom-end`, `top-start`, `bottom-start`.
- The host needs `position: relative` and no `overflow: hidden`; Button and TabsTrigger have it.
- Give `IndicatorDot` an `aria-label`, or it is hidden from screen readers.

## Anatomy

```text
Indicator
├─ IndicatorBadge (0..n)
└─ IndicatorDot (0..n)
```

## API reference

### Indicator

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `side` | `"bottom-end" \| "bottom-start" \| "top-end" \| "top-start"` | "top-end" |  |

### IndicatorBadge

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `side` | `"bottom-end" \| "bottom-start" \| "top-end" \| "top-start"` |  |  |
| `count` | `number` |  | The number to show. 0 (and a value under 0 or `NaN`, which count as 0) hides the badge, unless `showZero`. |
| `max` | `number` | 99 | The largest number to show. A larger count shows as `max` and a plus: "99+". Default 99. |
| `showZero` | `boolean` | false | Show the badge with "0" when `count` is 0. Default `false`: no news, no mark. |
| `locale` | `string` |  | The BCP 47 locale of the digits ("ar-EG" gives "٣"). Default: the `DisplayLocaleProvider` locale, else "en-US" (`useDisplayLocale`), so the server and the browser write the same digits. |
| `format` | `NumberFormatOptions` |  | `Intl.NumberFormat` options, for example `{ notation: "compact" }` with a large `max`. An object written inline is safe: the page cache (`numberFormats`) keys a formatter by its options, so equal options reuse one formatter. |
| `formatOverflow` | `function` | appendPlus | The text over `max`, from `max` in the locale digits. Default: the number and a plus after it (`(max) => \`${max}+\``). Pass another form for a locale that writes "or more" in another way (`(max) => \`≥${max}\``). |
| `animated` | `boolean` | true | Animate a change of the count: the digits roll (up for more, down for fewer), and a count that goes up pops the badge once. Over `max` the text stays and nothing moves. Default `true`. `false` swaps the text at once. |

### IndicatorDot

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `pulse` | `boolean` |  |  |
| `size` | `"default" \| "sm"` |  |  |
| `tone` | `"destructive" \| "info" \| "neutral" \| "success" \| "warning"` |  |  |
| `variant` | `"default" \| "muted" \| "ring"` |  |  |
| `side` | `"bottom-end" \| "bottom-start" \| "top-end" \| "top-start"` |  |  |
| `shown` | `boolean` |  | Shows or hides the dot with the badge motion: in on the `fade` clock (opacity and a scale from 0.9), out on `fadeExit`. A dot that shows when the page first renders shows at once. Leave it out to keep the dot always there (no motion).: the unread dot of the What's New Notice pops in when news arrives and leaves when the news is opened. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Indicator | `indicator` | `data-disabled` |  |  |
| IndicatorBadge | `indicator-badge` | `data-disabled` |  |  |
| IndicatorDot | `indicator-dot` | `data-disabled` |  |  |

## Usage

Wrap the host, and put the mark inside it.

The sample also uses `button`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui/indicator @gelatin-ui/button
```

```tsx title="inbox-button.tsx"
import { TrayIcon } from "@phosphor-icons/react/ssr";

import { Button } from "@/components/ui/button";
import { Indicator, IndicatorBadge } from "@/components/ui/indicator";

export function InboxButton() {
  return (
    <Indicator>
      <Button variant="ghost" size="icon" aria-label="Inbox">
        <TrayIcon />
        <IndicatorBadge count={3} />
      </Button>
    </Indicator>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/indicator
```

It adds 20 registry items: 18 files, 3689 lines, and the npm packages `@base-ui/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Dot](https://gelatinui.com/components/dot.md)
- [Rolling Number](https://gelatinui.com/components/rolling-number.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Badge](https://gelatinui.com/components/badge.md)
- [Dot](https://gelatinui.com/components/dot.md)
- [Rolling Number](https://gelatinui.com/components/rolling-number.md)
- [Avatar](https://gelatinui.com/components/avatar.md)

## Motion

| Part | Motion |
| --- | --- |
| Badge in and out | fade · the badge fades in and scales from 0.9; it leaves on fadeExit |
| Count up | panel · the digits roll and the badge pops to 1.1 and back |
