Skip to main content

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​

Storybook

Tones​

Storybook

Shapes And Sizes​

Storybook

Status Tags​

Storybook

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​

VariantWhat it is
neutralsurface-muted with ink-2.
successsuccess-strong on success-soft.
dangerdanger-strong on danger-soft.
warningwarning-strong on warning-soft.
infoprimary-strong on primary-soft.
aiai on ai-soft.
outlineBorder only.
shape pillRadius 999, the .dtag look.
StatusTagkind 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​

PropTypeDefaultDescription
toneBadgeTone'neutral''neutral' | 'success' | 'danger' | 'warning' | 'info' | 'ai' | 'outline'
shapeBadgeShape'square''square' | 'pill'
sizeBadgeSize'md''sm' | 'md'
iconIconNamenoneIcon before the label
dotbooleanfalseShows a small dot in the current colour before the label (ignored when `icon` is set)
childrenReactNode—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>
KindNameDescription
attributetone'neutral' | 'success' | 'danger' | 'warning' | 'info' | 'ai' | 'outline'; default 'neutral'
attributeshape'square' | 'pill'; default 'square'
attributesize'sm' | 'md'; default 'md'
attributeiconIcon before the label; default none
attributedotShows a small dot in the current colour before the label (ignored when `icon` is set); default false
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
slot(default)Label text, a status word in Title Case.