Badge
A small rounded pill of inline text for statuses, labels, and counts.
Show codeHide code
Installation
import { Badge } from "@makeplane/propel/components/badge";Usage
import { Badge } from "@makeplane/propel/components/badge";
export default function BasicDemo() {
return <Badge label="Badge" variant="neutral" size="xs" />;
}Examples
Variants
The variant axis carries both semantic color (neutral, brand, info, success, warning, danger) and
decorative label hues (grey, purple, indigo, emerald, yellow, crimson, orange). A
semantic name says why the badge is coloured; a hue name says only what colour it is, for a
badge that carries no meaning (“Live” is emerald, not success).
Show codeHide code
Sizes
size has three steps — xs 20 px with 12px text, sm 24 px with 13px and md 28 px with
14px — following the Figma badges set: 6 / 6 / 8px sides, a 4 / 4 / 6px icon gap, a 14 / 14 / 16px
glyph and a 4 / 6 / 6px corner. Height, gap, glyph and corner are the compact ladder’s rungs; the
sides are a badge’s own, a step tighter than a button’s from sm up.
Show codeHide code
With icon
Show codeHide code
Icon only
Omit label for a compact icon-only badge: the label part is skipped so the icon sits centered, and the pill renders role="img". Because the icon is decorative, aria-label is required in this state — the type makes omitting both label and aria-label an error.
Show codeHide code
API Reference
Badge
The ready-made badge: composes the atomic Badge pill with the BadgeLabel and optional leading
(startIcon) and trailing (endIcon) icon slots. With no label the pill is icon-only — the
label part is skipped entirely (an empty flex child would still consume the pill's gap and
render it lopsided), and the pill defaults to role="img" so an author-supplied aria-label is
valid ARIA (a bare <span>'s generic role doesn't support naming).