← Omnes specs UI

Contractus componentis

badge

Parva tessera ad genus, statum vel categoriam notandam.

Versio
v1.0.0

Props

NomenGenusValoresPraefinitum
variantenumneutral, ui-component, recipe, agent, configneutral

Slot

Nomen
default
Propositum
badge label content

Tokens

font
primitive.font.family

Aditus

native_element
span
role
none (decorative or content-derived)
notes
badge conveys categorical meaning via its label text; screen readers read the slot text. Consumers who need programmatic role semantics (e.g. status badges) should add role/aria via the host attribute.
JSON probatum crudum
{
  "name": "badge",
  "version": "1.0.0",
  "props": {
    "variant": {
      "type": "enum",
      "values": [
        "neutral",
        "ui-component",
        "recipe",
        "agent",
        "config"
      ],
      "default": "neutral"
    }
  },
  "slot": {
    "name": "default",
    "purpose": "badge label content"
  },
  "tokens_used": {
    "font": [
      "primitive.font.family"
    ]
  },
  "a11y": {
    "native_element": "span",
    "role": "none (decorative or content-derived)",
    "notes": "badge conveys categorical meaning via its label text; screen readers read the slot text. Consumers who need programmatic role semantics (e.g. status badges) should add role/aria via the host attribute."
  }
}
ChiralFM