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 (success, warning, danger) and decorative hues.
Show codeHide code
Sizes
size has two steps — xs 20 px with 12px text and sm 24 px with 13px. A badge is inline
chrome, so it stops where the compact ladder does; the old 18px step was retired when the
family moved onto the shared rungs.
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).