Cadence Clinical
Primitives

Badge

Labels an item with a short status, category or count, such as "Draft" or "Final".

Secondary

The default. Use it for a neutral label or a count.

Draft
import { Badge } from "@cadence-clinical/ui";

<Badge>Draft</Badge>;

Outline

Use an outline badge for a label with less weight.

Archived
<Badge variant="outline">Archived</Badge>

Primary

Use a primary badge for a label that needs to stand out and is not a status.

New
<Badge variant="primary">New</Badge>

Statuses

Use a status variant for a status the item has been given. The text says what the status is, so the badge does not rely on colour.

CancelledOverdueFinalAwaiting review
<Badge variant="critical">Cancelled</Badge>
<Badge variant="warning">Overdue</Badge>
<Badge variant="success">Final</Badge>
<Badge variant="info">Awaiting review</Badge>

A count

Say what the count counts, unless it is clear from where the badge sits.

3 new
<Badge>3 new</Badge>

Pass a link to render to make the badge a link. Write text that makes sense on its own.

<Badge variant="outline" render={<a href="/results" />}>
  3 new results
</Badge>

Long content

A badge that holds clinical text wraps. It is never clipped or cut short.

Allergy: amoxicillin and clavulanic acid
<Badge variant="warning">Allergy: amoxicillin and clavulanic acid</Badge>

On this page