# Badge

> Small solid or soft label for a fixed category or count, with status colour variants.

- Group: Feedback
- Status: stable
- Aliases: tag
- HTML page: https://design.ipmnx.com/components/badge/
- Spec: https://design.ipmnx.com/design/#nx-badge

## Preview

**Variants**

```html
<span class="nx-badge">Default</span>
<span class="nx-badge nx-badge--soft">Soft</span>
<span class="nx-badge nx-badge--success">
  <span class="nx-badge__dot"></span>
  Live
</span>
<span class="nx-badge nx-badge--warning">Beta</span>
<span class="nx-badge nx-badge--danger">Down</span>
```

```tsx
<NxBadge>Default</NxBadge>
<NxBadge variant="soft">Soft</NxBadge>
<NxBadge variant="success" dot>Live</NxBadge>
<NxBadge variant="warning">Beta</NxBadge>
<NxBadge variant="danger">Down</NxBadge>
```

## API

### React props (NxKit)

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `variant` | `"solid"\|"soft"\|"neutral"\|"info"\|"success"\|"warning"\|"danger"` | `"solid"` |   | Fill/tint + status colour. |
| `dot` | `boolean` | `false` |   | Prefix a status dot. |

### Classes

| Class | Description |
| --- | --- |
| `.nx-badge` | Solid accent fill |
| `.nx-badge--soft` | Accent-100 tint |
| `.nx-badge--neutral` | Neutral semantic surface and text |
| `.nx-badge--success` | Solid-fill success token |
| `.nx-badge--warning` | Warning tint, dark text |
| `.nx-badge--danger` | Solid-fill danger token |
| `.nx-badge__dot` | currentColor status dot |

## Accessibility

- Status badges pair colour with the word itself ("Live", "Down"), never colour/dot alone.

## Do / Don't

- Do: Use --success/--warning/--danger only for real status meaning.
- Don't use badge as a clickable control. It has no interactive semantics.

## Related

- [Status pill](https://design.ipmnx.com/components/status-pill.md)
- [Alert](https://design.ipmnx.com/components/alert.md)

---

Source: registry.js (NX Design System)
