Kinetic Badge

A small tag for status, category or count, in five tones and three styles, with an optional dot and remove button.

  • <kt-kinetic-badge>
  • Display
  • No framework

Kinetic Badge

DeployedBetaNew releasedesign-systemBuild failed

The code

Copy the Kinetic Badge

Fastest: press Copy on the card above for one complete file. To build it into your own project, use the files below: the markup, the styles, this component’s script and the shared effects script (effects.js) that every component uses.

<kt-kinetic-badge tone="success" variant="soft" dot>Deployed</kt-kinetic-badge>

<kt-kinetic-badge tone="warning" variant="outline" size="sm">Beta</kt-kinetic-badge>

<kt-kinetic-badge tone="accent" variant="solid">New release</kt-kinetic-badge>

<kt-kinetic-badge tone="neutral" variant="soft" dismissible>design-system</kt-kinetic-badge>

<kt-kinetic-badge tone="error" variant="soft" dot dismissible>Build failed</kt-kinetic-badge>

Attributes

NameWhat it doesDefault
tone"neutral", "accent", "success", "warning" or "error".neutral
variant"solid", "soft" or "outline".soft
size"sm" or "md".md
dotShow a small status dot before the text.—
dismissibleShow a remove button. It plays a pop-out, hides the badge and fires "dismiss".—

Keyboard and screen readers

  • The badge text is plain text, so it is read in the normal flow.
  • The dot is decorative and hidden from screen readers: do not rely on color alone, say the status in the text.
  • The remove button is a real button with the label "Remove <text>"; Tab reaches it, Enter or Space activates it.

Styling variables

Every look is a CSS variable: --kt-accent, --kt-accent-ink, --kt-radius-btn, --kt-surface-radius, --kt-surface-bg, --kt-border-w, --kt-comp-shadow and --font-sans. The copied file sets them all from your choices.

FAQ

Kinetic Badge: questions answered

How do I use the Kinetic Badge?

Press Copy on the card to get a complete HTML file, or copy the HTML, CSS and JavaScript tabs into your own page. In your markup the element is written as <kt-kinetic-badge>.

Which attributes does <kt-kinetic-badge> accept?

tone, variant, size, dot, dismissible. Each one is described in the attributes table on this page.

Is the Kinetic Badge accessible?

The badge text is plain text, so it is read in the normal flow. The dot is decorative and hidden from screen readers: do not rely on color alone, say the status in the text. The remove button is a real button with the label "Remove <text>"; Tab reaches it, Enter or Space activates it.

Can I change the Kinetic Badge colors, corners and font?

Yes. Use the options on this page: accent color, border radius, background, border, shadow and Google font. The copied code already contains your choices, and every one of them is a CSS variable you can edit later.