Skip to main content

Badge

A Badge is a small, non-interactive UI element used to display status, labels, categories, or short pieces of information. It helps users quickly identify important details, such as "Active", "New", or "Beta".

Base
Mantine + override
Mantine
Import
{ Badge } from '@mantine/core'
Source
src/themes/component-overrides/feedback.ts
src/themes/style-overrides/badge.module.css

Usage​

Aktiv
variant
size
sm
md
lg
React
<Badge variant="info" size="md">Aktiv</Badge>

Labels keep their own casing and are set in regular weight.

Variants​

Fullført
Venter
Avvist
Info
Nøytral
Ny
React
<Badge variant="success">Fullført</Badge>
<Badge variant="warning">Venter</Badge>
<Badge variant="error">Avvist</Badge>
<Badge variant="info">Info</Badge>
<Badge variant="neutral">Nøytral</Badge>
<Badge variant="warm">Ny</Badge>
VariantUse it for
successA completed or successful state.
warningSomething that needs the user's attention.
errorA failed or rejected state.
infoInformation for the user.
neutralInformation, or a plain label with no status attached.
warmInformation, or a plain label with no status, in a warmer tone.

Mantine's own variants still work. These six are additions.

Props​

Only what this design system changes or adds. Everything else is Mantine's — read the full props table there.

PropertyTypeAllowed valuesDefaultDescription
variantstringsuccess · warning · error · info · neutral · warmneutralSelects the status treatment — a tinted background with a matching border and text colour.
sizeMantineSizesm · md · lgsmSets height and font size — 20, 24 or 28px. xs and xl are not themed and fall back to Mantine's own sizing.
radiusMantineRadius | number—smRounds the corners — 5px. The md size uses 8px.

Accessibility​

Never let the tint carry the status on its own — the label text must say it. See Accessibility.