Menu
Esc
DocsGitHub TR

Components

Badge

A small label for a status, a category or a count. It is not clickable.

Open in Figma

Playground

Badge

Figma variant

💅 Style=Primary
👕 Size=Medium
Disabled=False
Filled=False
Icon Leading=False
Icon Trailing=False

Variants

Seven tones, each as an outline (the default) or filled. Disabled turns any badge grey.

DefaultPrimarySecondaryTertiaryErrorSuccessWarning
DefaultPrimarySecondaryTertiaryErrorSuccessWarning
DisabledDisabled

Sizes

Medium and Small use the body text; Tiny and Micro the small text. Micro is a compact 20px pill.

MediumSmallTinyMicro
SizeHeightPaddingGapTextIcon
medium40px--space-tiny --space-medium--space-tinyui/text/regular16px
small32px--space-micro --space-small--space-tinyui/text/regular16px
tiny24px--space-micro --space-tiny--space-microui/text small/regular12px
micro20px--space-atom (+ --space-micro text)0ui/text small/regular10px

Tokens

ToneOutline line / textFilled background / text
default--color-surface-level-4 / --color-foreground-high-emphasis--color-foreground-high-emphasis / --color-foreground-level-2
primary--color-primary / --color-primary--color-primary / --color-on-primary
secondary--color-secondary / --color-on-secondary--color-secondary / --color-on-secondary
tertiary--color-tertiary / --color-on-tertiary--color-tertiary / --color-on-tertiary
error--color-error / --color-error--color-error / --color-on-error
success--color-success / --color-success--color-success / --color-on-success
warning--color-warning / --color-warning--color-warning / --color-on-warning
disabled--color-surface-level-3 / --color-foreground-low-emphasis—

--badge-radius · --color-surface-level-1 (outline background)

Notes from Figma

  • Outline Secondary and Tertiary use their on-color for the text (on-secondary, on-tertiary), the other tones use the tone itself.
  • Disabled exists only for the Default style; code applies it to every tone.
  • Micro outline badges have no fill, and the Default Micro outline uses foreground/ghost-emphasis instead of surface/level-4.
  • Warning Micro filled uses primary/on-primary for the text; code uses on-warning like the other sizes.

Figma to code

FigmaReact
💅 Style = Default / Primary / Secondary / Tertiary / Error / Success / Warningtone='default' / 'primary' / … / 'warning'
👕 Size = Medium / Small / Tiny / Microsize='medium' / 'small' / 'tiny' / 'micro'
Filled = Truefilled
Disabled = Truedisabled
Icon Leading / Icon TrailingiconLeft={<Icon… />} / iconRight={<Icon… />}