Getting StartedInstallation and setup guides 5
LayoutWorkflow and structural layout components 7
OverlayModal and floating layer surfaces 3
FeedbackStatus, empty, progress, and loading placeholder patterns 5
FormInput and selection components 17
UtilityGeneral-purpose interface utilities 7
NavigationMenu surfaces and hierarchical actions 7

Styling contract

The components package keeps the same stable badge hooks as the primitive, so you style the host and generated bubble without depending on any extra wrapper markup.

Stable hooks

AttributeValuesUsage
data-slotbadgeStable selector for the generated badge bubble element.
data-positiontop-end | top-start | bottom-end | bottom-startPlacement hook for custom transforms and alignment tweaks.
data-sizesm | md | lgSize scale hook.
data-tonedanger | info | neutral | success | warningSemantic tone hook.
data-variantsolid | soft | outlineVariant hook for filled, soft, and outlined treatments.
data-dotpresent / absentApplied when dot mode is active.
data-disabledpresent / absentApplied when tngBadgeDisabled is true.

Generated node

  • .tng-badge-host is applied to every host carrying tngBadge.
  • .tng-badge is applied to the generated bubble node.
  • data-tng-badge-host is set on the host for parent-level styling.

Owner guidance

Target the generated bubble under your host and keep host layout decisions on your own host class. The components export does not add a visual wrapper of its own.

badge.contract.css

css
.tng-badge-host {
  position: relative;
}

.tng-badge[data-tone="success"][data-variant="soft"] {
  background: color-mix(in srgb, var(--tng-semantic-accent-success) 18%, transparent);
  color: var(--tng-semantic-accent-success);
}

.tng-badge[data-variant="outline"] {
  background: var(--tng-semantic-background-base);
  border: 1px solid var(--tng-semantic-border-strong);
}

.tng-badge[data-dot] {
  min-height: 0.56rem;
  min-width: 0.56rem;
  padding: 0;
}

.tng-badge[data-position="bottom-start"] {
  transform: translate(-50%, 50%);
}