Color
Typography
Spacing
Radius
Border
Opacity
Elevation
Blur
Avatar
Badge
Button
Checkbox
Input
ProgressBar
RadioButton
Separator
Slider
Switch
TextArea
TextLink
Accordion
Breadcrumb
ButtonGroup
Combobox
DropdownMenu
ListItem
Pagination
SegmentedControl
Select
Tooltip
Calendar
Card
CommandMenu
DatePicker
Dialog
Drawer
EmptyState
Footer
Form
NavigationBar
Sidebar
Skeleton
Table
Tabs
Toaster

Badge

Short status label with an optional icon. Six statuses: Brand, Default, Error, Warning, Success and Info.

Badge
Status

Usage

Import the component and render it.

import { Badge } from 'src/components/Badge/Badge';
import { LifebuoyIcon } from '@phosphor-icons/react';

<Badge status="brand" iconStart={<LifebuoyIcon />}>Badge</Badge>

Accessibility

Role: none (static <span>; the text is read as part of the surrounding content).

  • Not focusable: a badge only labels something.
  • The icon is decorative (aria-hidden). Color alone does not carry the status: the label text must say it.

Status

Set the status prop: Brand is "brand", Default is "default", Error is "error", Warning is "warning", Success is "success", Info is "info".

Badge
Brand
Badge
Default
Badge
Error
Badge
Warning
Badge
Success
Badge
Info
<Badge status="brand">Badge</Badge>
<Badge status="default">Badge</Badge>
<Badge status="error">Badge</Badge>
<Badge status="warning">Badge</Badge>
<Badge status="success">Badge</Badge>
<Badge status="info">Badge</Badge>

Used in

Badge is part of Card, Sidebar and Table.