> A guide to [@fabiocv/ui](https://ui.fabio.cv/). Every guide is listed at https://ui.fabio.cv/llms.txt.

# Badge

A short word that marks the text before it, exported from `@fabiocv/ui/badge`.

```tsx
import { Badge } from '@fabiocv/ui/badge';

<span>
  Lab <Badge>SOON</Badge>
</span>;
```

- It is a word and nothing else: `Text.GroupLabel` in Medium, `12px` on a `16px` line, with no box, ground or colour of its own.
- It takes the ink of the text it marks, and changes with it, so it reads as part of that text. Size and weight set it apart.
- It takes the font and line of that text too, so its word sits on the same baseline.
- The word is written in capitals, as `SOON` is.
- A menu item has its own, `badge`, which shows while the item is highlighted.
- It renders a `span`. Other props go to it.
- For text in a box, use a [Tag](https://ui.fabio.cv/tag/index.md).

## Types of `@fabiocv/ui/badge`

```ts
/** A short word that marks the text before it, such as Soon. */
export declare function Badge({ className, children, ...props }: ComponentPropsWithoutRef<'span'>): import("react").JSX.Element;
```

## Examples

### Default

```tsx
<Badge>SOON</Badge>
```

### Beside text

```tsx
<span>
  Lab <Badge>SOON</Badge>
</span>
```

See it at https://ui.fabio.cv/badge/.
