Noctis

Badge

A small label for status, categorization, or metadata — a pill chip that sits inline with text or in a row of its own. Its look is two orthogonal axes: variant sets the emphasis and tone sets the colour, so a quiet metadata chip and a loud status share one component.

Basic

A bare Badge.Root is a quiet soft neutral chip — the default metadata label. Pass children as the text.

New

Variants

variant is the emphasis axis: a filled solid chip, a quiet soft tint (the default), or a transparent outline with a coloured edge. It is orthogonal to tone — every variant works with every tone.

solidsoftoutline

Semantic tones

tone sets the colour identity. The six semantic tones carry meaning — neutral (the default), accent, and the four statuses success, warning, danger, and info — and paint from their role families, so a retheme propagates. Reach for these when the colour signals state.

neutralaccentsuccesswarningdangerinfo

Decorative colours

The eight decorative tones — red, orange, amber, green, teal, blue, purple, pink — are accent-independent category colours drawn from the shared categorical palette. Use them to distinguish categories (a product, a label, a team), not to signal status — they carry no semantic meaning and never re-derive off the accent. They read best as solid.

redorangeambergreentealbluepurplepink

Status dot

Compose a leading Badge.Dot for an at-a-glance status dot. It is decorative (aria-hidden) — pair it with a label like "Healthy" so the meaning is never colour-only — and fills with the chip's text colour, so it reads as a knockout on a solid chip and as the saturated tone on a soft/outline one.

HealthyDegradedOffline

Dot badges

The dot variant is a quieter take: the chip stays neutral — a transparent fill, a hairline border, neutral text for every tone — and the leading Badge.Dot alone carries the status colour. Reach for it when a row of statuses shouldn't each shout a full-colour chip; the dot still reads at a glance while the labels stay calm.

HealthyWarningErrorNeutral

Icon

Compose a leading Badge.Icon for a glyph. It clamps the icon to the chip's size and inherits its colour. Wrap an <Icon> (or any inline svg) inside it — don't put data-slot on the icon itself, which would drop its own token sizing.

Verified

Sizes

size is md (the default) or sm — the smaller chip for dense rows or inline-with-text use. The label type and the dot/icon scale with it.

smmd

In a sentence

A sm badge sits proportionally beside running text — a "New" or "Beta" marker after a feature name.

WorkersNew

Accessibility

A badge is a label, not a control — its text content is its accessible name, so most badges need nothing extra. The Badge.Dot and Badge.Icon are decorative (aria-hidden), so a status that's signalled by colour or a dot must also be in the label text ("Online", not a bare green dot). For a standalone icon-only chip, give Badge.Root an aria-label. Rendering a badge as an <a> (via Badge.Root.props(...)) keeps it keyboard-reachable as a link.

Anatomy

Compose the chip from its parts. Badge.Root renders a <span> by default; spread Badge.Root.props(...) onto an <a> (or any element) to style it as a chip.

  • Badge.Root — the pill; owns variant (emphasis), tone (colour), and size.
  • Badge.Dot — an optional leading status dot. Decorative; fills with the chip's currentColor.
  • Badge.Icon — an optional leading glyph. Decorative; clamps its icon to the chip's icon size and inherits its colour.

Every rendered part carries a data-slot (noctis-badge on the chip, noctis-badge-dot on the dot, noctis-badge-icon on the icon wrapper) for host-side styling — pair it with the data-variant/data-tone/data-size axes the root stamps, off which the colour grid and per-size metrics are keyed.

Theme scope

ThemeScope re-tunes a whole region's shape — corner radius, density, and type scale — through the cascade, with no per-component prop and without touching the app-wide theme. Tweak the knobs below and watch every Badge inside the scope retune together. See Customization for nesting, reset, and the portal caveat.

SuccessWarningDangerAccent

On surfaces

The same chip re-tuned across the elevation scopes — the root canvas, an elevated panel, a menu, and a sunken well. It stays legible on every layer.

root
NewLiveErrorBetaWorkers
elevated
NewLiveErrorBetaWorkers
menu
NewLiveErrorBetaWorkers
sunken
NewLiveErrorBetaWorkers

Design tokens

Generated from the component's declaration — the same graph that mints the CSS, so a variable name or its resolution default can't drift. The minted tokens are the public override seam: set one on any ancestor and every badge in that region retunes — e.g. .tags { --noctis-badge-border-radius: var(--noctis-radius-sm); } squares the chips beneath it. Colours aren't minted — the grid reads the semantic roles and the shared categorical palette directly, so a retheme propagates for free. See Customization for the full override ladder and Tokens for the whole graph.

Token

API reference

Generated from the component's types — every prop, type, default, and description comes straight from the source. Each part gets its own table. Expand a row for the full type and description.

Badge.Root

Prop

Badge.Dot

Prop

Badge.Icon

Prop

AttributeDescription
data-slotThe root chip element.
data-variantThe emphasis — `solid` (filled) | `soft` (tint, default) | `outline` (transparent, coloured edge).
data-toneThe colour identity — a semantic tone (`neutral`…`info`) or a decorative hue (`red`…`pink`).
data-sizeThe chip scale — `sm` | `md` (default); the generated layer keys the per-size internals off it.