BADGE: Passive inline indicator for counts, status dots, and key-value labels
TIERS: Solid | Subtle | Soft | Outline | Text-only
FEATURES: Label (key-value) | Circle | Dot | Sizes | Notification positioning

Use badges to label items with status, category, or count information. Five prominence tiers from bold to minimal. For interactive chips (removable, clickable), use Tag instead.

Solid Variants (Bold)

Solid badges: Full-color background with white text for high visibility. Use for primary status indicators that need to stand out.

Default Primary Secondary Success Danger Warning Info
<span class="tw-badge tw-badge-success">Success</span>

Subtle Variants

Subtle badges: Light tinted background with dark text and tinted border. Use when you need semantic colors with moderate visual weight.

Primary Secondary Success Danger Warning Info
<span class="tw-badge tw-badge-success-subtle">Success</span>

Soft Variants

Soft badges: Same tinted background as subtle, but without a border. Use for softer emphasis where the border adds too much visual noise. Note: .tw-badge-secondary-soft is visually identical to the default .tw-badge — use it when you want an explicit semantic choice that matches the naming system.

Primary Secondary Success Danger Warning Info
<span class="tw-badge tw-badge-success-soft">Success</span>

Outline Variants

Outline badges: Transparent background with colored border and text. Use for secondary emphasis or when you need a lighter visual weight.

Primary Secondary Success Danger Warning Info
<span class="tw-badge tw-badge-outline-primary">Primary</span>

Text-Only Variants

Text-only badges: No background or border — just colored text. Use for minimal inline indicators where the badge should blend with surrounding text.

Neutral Primary Success Danger Warning Info
<span class="tw-badge tw-badge-text-primary">Primary</span>

Size Variants

Sizes: Small for compact spaces (table cells), default for general use, large for emphasized labels.

Small (10px) Default (12px) Large (14px)
<span class="tw-badge tw-badge-primary tw-badge-sm">Small</span>

Shape Variants

Shape variants: Badges have pill shape (fully rounded) by default. Use .tw-badge-rounded for subtle rounded corners. For perfect circles, see the Circle Badges section below.

Default Pill Success Pill Rounded Rounded Success
<span class="tw-badge tw-badge-primary">Default Pill</span>
<span class="tw-badge tw-badge-primary tw-badge-rounded">Rounded</span>

Circle Badges

Circle badges: Perfect circle shape that doesn't expand horizontally. Ideal for notification counts, numeric indicators, and single-character labels. Use .tw-badge-circle with any color variant.

Color Variants

5 8 3 12 7 99+

Size Variants

3 3 3

Typical Content

1 9 12 99 99+ !
<span class="tw-badge tw-badge-danger tw-badge-circle">3</span>
<span class="tw-badge tw-badge-primary tw-badge-circle tw-badge-sm">12</span>
<span class="tw-badge tw-badge-info tw-badge-circle">99+</span>

Dot Indicator

Dot badges: Add a colored dot prefix for status indicators. The dot inherits the badge text color. Best used with subtle, soft, outline, or text-only tiers where the dot color is visible against the background. Dot size scales proportionally with badge size (sm/default/lg).

Subtle Variants

Active Pending Offline Processing

Soft Variants

Active Pending Offline Processing

Size Variants

Small Default Large

Outline & Text-Only

Active Error Active Error
<span class="tw-badge tw-badge-success-subtle tw-badge-dot">Active</span>

Label (Key-Value Pair)

Label badges: Use .tw-badge-key inside a badge to create a key-value label. The key portion gets a semibold weight and a right separator. Works with all variants and sizes.

With Subtle Variants

Status Active Priority High Source Open Day Due 3 days

With Other Tiers

Year 7 Stage Enrolled Ref #2024-001 Type Email

Size Variants

Status Active Status Active Status Active
<span class="tw-badge tw-badge-success-subtle"><span class="tw-badge-key">Status</span> Active</span>

Combined Variants

Combining modifiers: You can combine size, shape, and dot modifiers with any color variant across all five tiers.

Small Pill Large Dot Small Outline Dot Badge Subtle Badge Soft Small Dot Rounded Text Small
<span class="tw-badge tw-badge-success tw-badge-sm">Small Pill</span>
<span class="tw-badge tw-badge-primary tw-badge-rounded">Rounded</span>

Use Case Examples

Real-world usage: Badges in context with other components.

Application Status

Application #2024-001

Submitted

John Smith - Year 7 Entry

Key-Value Labels

Spring Open Day Campaign

Active
Channel Email Channel SMS Sent 2,847

In Tables

Name Status Type
Summer Campaign Live Email
Winter Newsletter Draft Newsletter
Spring Event Invite Ended Event

Notification Counts

Prototype Migration Reference

Migrating from prototype: Class mapping for existing prototype pages.

Prototype Class New Class Example
.badge-active .tw-badge.tw-badge-info Active
.badge-success .tw-badge.tw-badge-success Success
.badge-warning .tw-badge.tw-badge-warning Warning
.badge-draft .tw-badge.tw-badge-secondary Draft
.badge-completed .tw-badge.tw-badge-success Completed