# Badge

> A short status or category label.

```tsx
import { Badge } from '@brand-studio/ui';

export default function BadgeDemo() {
  return (
    <div style={{ display: 'flex', flexWrap: 'wrap', gap: 8 }}>
      <Badge>Single origin</Badge>
      <Badge tone="accent">New</Badge>
      <Badge tone="outline">Decaf</Badge>
    </div>
  );
}
```

## Installation

```sh
npm install @brand-studio/ui
```

React 18 or 19 is a peer dependency. Import the stylesheet once and wrap the app in a brand theme:

```tsx
import '@brand-studio/ui/styles.css';
import { BrandTheme, Badge } from '@brand-studio/ui';
import brand from './brand.json';

<BrandTheme palette={brand.tokens} mode="system">
  {/* your app */}
</BrandTheme>
```

## Usage

```tsx
import { Badge } from '@brand-studio/ui';
```

```tsx
<Badge tone="accent">New</Badge>
```

## Accessibility

- Badges are plain text. Do not use colour alone to carry meaning.

## API Reference

| Prop | Type | Default |
|---|---|---|
| `tone?` | `"accent" \| "neutral" \| "outline"` | `'neutral'` |

Source: https://brandstudio.js.org/docs/components/badge/
