Badge
BasicData display
<co-badge>Badge is a small coloured label for a status or attribute; StatusTag picks the right colour for claim, PA, appointment and eligibility statuses.
import { Badge } from 'health-components';
Examples
Showcase
Tones
Shapes And Sizes
Status Tags
Usage
<Badge tone="info" shape="pill">Behavioral Health</Badge>
<StatusTag kind="claim" status="Denied" />
<StatusTag kind="pa" status="Pended" />
When to use
- Statuses in tables and banners: Paid, Denied, Pended, Confirmed, Eligible.
- Attributes: "Behavioral Health", "New Patient".
When not to use
- Actions: Button. Filters: FilterChip.
Variants and states
| Variant | What it is |
|---|---|
| neutral | surface-muted with ink-2. |
| success | success-strong on success-soft. |
| danger | danger-strong on danger-soft. |
| warning | warning-strong on warning-soft. |
| info | primary-strong on primary-soft. |
| ai | ai on ai-soft. |
| outline | Border only. |
| shape pill | Radius 999, the .dtag look. |
| StatusTag | kind claim, pa, appointment or eligibility maps the status word to a tone and adds an icon (check, x, clock, info, sparkle) so colour is never the only cue. |
Accessibility
- Each status has a word and an icon; never colour alone.
- All tone pairs pass 4.5:1 in every theme (checked in tokens.json).
Do and don't
- Do: Claim statuses: Draft, Ready, Submitted, Accepted, Rejected, Denied, Pending, Partially Paid, Paid, Appealed, Void.
- Do: PA statuses: Not Started, Submitted, In Review, Pended, More Info Needed, Approved, Partially Approved, Denied, Expired, Not Required.
- Do: Appointment: Scheduled, Confirmed, Arrived, Checked In, In Room, Checked Out, Completed, No Show, Cancelled. Eligibility: Active, Inactive, Unknown, Not Checked, Error, Self-Pay.
- Don't: New status words per screen ("Approved-ish"). Add them to the StatusTag map first.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
tone | BadgeTone | 'neutral' | 'neutral' | 'success' | 'danger' | 'warning' | 'info' | 'ai' | 'outline' |
shape | BadgeShape | 'square' | 'square' | 'pill' |
size | BadgeSize | 'md' | 'sm' | 'md' |
icon | IconName | none | Icon before the label |
dot | boolean | false | Shows a small dot in the current colour before the label (ignored when `icon` is set) |
children | ReactNode | — | Label text, a status word in Title Case. |
Also accepts native attributes, including defaultChecked, defaultValue, autoFocus, plus className and event handlers on the root element.
Angular, Vue and HTML
Register the elements once (Angular guide), then use <co-badge>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.
Angular template
<co-badge tone="…" shape="…" [defaultValue]="defaultValue">…</co-badge>
| Kind | Name | Description |
|---|---|---|
| attribute | tone | 'neutral' | 'success' | 'danger' | 'warning' | 'info' | 'ai' | 'outline'; default 'neutral' |
| attribute | shape | 'square' | 'pill'; default 'square' |
| attribute | size | 'sm' | 'md'; default 'md' |
| attribute | icon | Icon before the label; default none |
| attribute | dot | Shows a small dot in the current colour before the label (ignored when `icon` is set); default false |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus | |
| slot | (default) | Label text, a status word in Title Case. |