Badge

Static badges and tags for status indicators, feature highlights, and categorical labels. Derived from mockup specifications with full dark mode support.

Accent Muted Outline Overlay Primary Secondary With Icon Sizes App-shell (Glassy)

📐 Badge Element System

Single source of truth for all badges. Do NOT create custom badge classes in component-specific CSS.
All badges automatically support light/dark themes and glassy contexts (app-shell, entity headers, panels).

Use the 🌙 toggle (top-right) to test badges in both themes.

🎯 Design Intent

Badge Element provides static visual labels for status, features, and categories.

Not the same as Buttons: Badges are for display only. For interactive elements, use Button or Action Tile components.

Mockup Mapping

Badge variants derived from canonical mockups (guest-layout.html, offers-search.html):

Mockup → Badge Element Mapping
Mockup Class Use Case Badge Element
.card-offer-badge-right Featured/Popular highlights .badge .badge--accent
.card-offer-badge-left Availability on images .badge .badge--overlay
.card-offer-tag Feature tags in cards .badge .badge--muted
.badge-seasonal Category indicators .badge .badge--orange
.tag-green Amenity features .badge .badge--green

1. Accent Badge

Highlighted badges for featured content, promotions, or important status (amber color with backdrop blur).

Live Preview
🔥 Popular 💻 Remote-friendly Featured
HTML Structure
<span class="badge badge--accent">🔥 Popular</span>
<span class="badge badge--accent">Featured</span>

2. Muted Badge

Neutral badges for feature tags, amenities, and secondary information (light gray background).

Live Preview
🏠 House A or B 👥 up to 6 guests 🔥 BBQ included 📶 WiFi
HTML Structure
<span class="badge badge--muted">🏠 House A or B</span>
<span class="badge badge--muted">👥 up to 6 guests</span>

3. Outline Badge

Bordered badges for subtle emphasis or secondary categorization.

Live Preview
Available Seasonal Limited
HTML Structure
<span class="badge badge--outline">Available</span>

4. Overlay Badge

Badges positioned on images with backdrop blur for better readability (green variant for availability).

Live Preview
Available 🔥 Featured
Image Background Example
HTML Structure (On Image)
<div style="position: relative;">
  <img src="property.jpg" alt="Property">
  <span class="badge badge--overlay badge--absolute-tl">Available</span>
  <span class="badge badge--accent badge--absolute-tr">🔥 Featured</span>
</div>

5. Brand Color Variants

Badges using brand palette colors for categorization and feature highlighting.

Live Preview
Primary Secondary Blue Tag Green Tag Purple Tag Orange Tag
HTML Structure
<span class="badge badge--primary">Primary</span>
<span class="badge badge--green">Green Tag</span>
<span class="badge badge--orange">Orange Tag</span>

6. Badge with Icon

Badges with left-aligned Heroicons for enhanced visual communication.

Live Preview
Guided Tour Fireplace Flexible Check-in
HTML Structure
<span class="badge badge--green">
  <svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
  </svg>
  Guided Tour
</span>

7. Size Variants

Badge sizes for different contexts and visual hierarchies.

Live Preview
Small Medium (Default) Large
HTML Structure
<span class="badge badge--accent badge--sm">Small</span>
<span class="badge badge--accent">Medium (Default)</span>
<span class="badge badge--accent badge--lg">Large</span>

8. Badge Group

Multiple badges arranged with consistent spacing using .badge-group.

Live Preview
🏠 House A 👥 up to 6 🔥 BBQ 📶 WiFi 🚴 Bikes
HTML Structure
<div class="badge-group">
  <span class="badge badge--muted">🏠 House A</span>
  <span class="badge badge--muted">👥 up to 6</span>
  <span class="badge badge--muted">🔥 BBQ</span>
</div>

9. App-shell Badges (Glassy)

Badges used in signed-in GLASSY UI for status indicators and counters in entity headers, dashboards, and management interfaces.

✅ Enhanced for Glassy Backgrounds

.badge--outline now has enhanced visibility on glassy backgrounds with semi-transparent background and brighter borders. Perfect for code badges and ID labels in entity headers.

9.1 Status Badges

Glassy Context (Signed-in App)
Active Inactive Draft Pending Archived
HTML
<span class="badge badge--green">Active</span>
<span class="badge badge--muted">Inactive</span>
<span class="badge badge--blue">Draft</span>
<span class="badge badge--orange">Pending</span>
<span class="badge badge--outline">Archived</span>

9.2 Counter Badges

Used in entity headers and summary views with emoji icons for quick metrics.

Glassy Context (Signed-in App)
🏠 2 Units 🪟 4 Windows 🎁 6 Extras
HTML
<div class="badge-group">
  <span class="badge badge--muted">🏠 2 Units</span>
  <span class="badge badge--muted">🪟 4 Windows</span>
  <span class="badge badge--muted">🎁 6 Extras</span>
</div>

9.3 Size Variants in Glassy Context

Badge sizes for different contexts in app-shell layouts.

Glassy Context (Signed-in App)
Small Default Large
HTML
<span class="badge badge--primary badge--sm">Small</span>
<span class="badge badge--primary">Default</span>
<span class="badge badge--primary badge--lg">Large</span>

9.4 Combined Example (Entity Header)

Typical badge usage in an entity header combining status and counters.

Glassy Context (Signed-in App)
OFF-2024-001 Active
🏠 2 Units 🪟 3 Windows 🎁 5 Extras
HTML
<!-- Code badge + Status -->
<span class="badge badge--outline">OFF-2024-001</span>
<span class="badge badge--green">Active</span>

<!-- Stats counters -->
<div class="badge-group">
  <span class="badge badge--muted">🏠 2 Units</span>
  <span class="badge badge--muted">🪟 3 Windows</span>
  <span class="badge badge--muted">🎁 5 Extras</span>
</div>

Usage Guidelines

✅ Do

  • • Use .badge--accent for featured/popular highlights
  • • Use .badge--muted for feature tags in cards
  • • Use .badge--overlay for badges on images
  • • Use .badge-group wrapper for multiple badges
  • • Include icons (Heroicons SVG) for enhanced meaning
  • • Keep badge text short (1-3 words)
  • • All badge styling in /assets/css/badge.css
  • • Badges automatically adapt to glassy contexts

❌ Don't

  • • Don't create custom badge classes in component-specific CSS
  • • Don't duplicate badge styling in Templates/Views
  • • Don't use badges for interactive elements (use buttons instead)
  • • Don't stack badges vertically without .badge-group
  • • Don't use too many badges in one area (limit to 3-5)
  • • Don't mix badge variants randomly - maintain visual hierarchy
  • • Don't create semantic variants (success/warning/error) - use brand colors only

⚠️ Layering Contract

Badge Element styles live in /assets/css/badge.css. Badges in Cards, Forms, Lists, or any higher-level pattern MUST use these classes. If you need a new badge variant, add it to the Badge Element definition, not to the higher-level component.

CSS Location

All badge styles are defined in:

/assets/css/badge.css

Imported by: /assets/css/ui-system.css

Includes: Base badge styling, all variants (accent, muted, outline, overlay), brand color badges, size variants, icon support, glassy context adaptations, and badge-group wrapper.

Related Documentation