StellarUI

<stellar-badge>

Properties

Component
Example

Preview

Badge

Markup

Copy
<stellar-badge icon="mdi:tag-outline">Badge</stellar-badge>

API

Complete props, events, slots, and implementation notes for the shipped badge.

Props

PropTypeDefaultNotes
toneneutral | primary | secondary | tertiary | errorneutral
sizexs | sm | md | lg | xlmd
appearancesolid | outline | dash | soft | ghostsolid
iconstring''

Events

EventSourceNotes
custom eventsnonestellar-badge is a presentational label and does not emit custom events.

Slots

SlotNotes
iconOptional leading icon content. Overrides the icon prop when populated.
defaultBadge label content.

Notes

  • The public tag is `stellar-badge`, backed by a real inline `<span>` inside the shadow root.
  • The shipped API is `tone`, `appearance`, `size`, and optional leading `icon`.
  • The docs page now uses Datastar controls to drive one live badge instance instead of a static permutation matrix.
  • `stellar-badge` uses `mode: 'open'`, so its styles stay encapsulated while still reading exported `stellar.css` variables through the shadow boundary.
  • The visual baseline follows the shipped badge tone, outline, dash, soft, ghost, and size behavior with direct Stellar token mapping.