Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Badge

A small monospace pill that labels a status, a category or a count next to the thing it describes.

ComponentsBadge
datastatic
<arc-badge>

Overview

Badge is a small pill-shaped label for a status, a category or a count. It's small enough to annotate a table row, a card header or a sidebar item without pushing the layout around. Three of the seven variants are for labels that categorize: `default` (neutral gray) for categories and metadata, `primary` for an active or informational state such as "In progress", "New" or a notification count, and `secondary` for a separate category such as "Featured", "Beta" or "Archived". The other four (`success`, `warning`, `error` and `info`) are the library's status set. They use the semantic color tokens, so a badge reporting a state matches an Alert or a Tag reporting the same one. Use them for a build result, a health check or a severity. If none of the seven fit, the `color` prop takes an RGB triplet and overrides the variant, for category colors that come from data. Badge and Tag look different on purpose. Badge is monospace, sentence case and compact. Tag is uppercase in the label font with 2px tracking and a touch-sized minimum height. They were slated to merge in v4 and didn't, because merging would have reset every badge in Tag's uppercase face, turning `v3.2.0` into `V3.2.0` in a taller box. Use Badge for dense inline annotation and Tag for filter chips and categorical labels. Badge renders a `<span>` with no ARIA role, so badges in table cells, list items and cards add no focus stops.

Guidelines

Do

  • Keep labels to one or two words
  • Put a badge next to the thing it annotates: a heading, a table cell, a nav item
  • Put two badges side by side for a combined status, such as category plus state

Don't

  • Don't use a badge for a sentence. Use an Alert
  • Don't rely on color alone. The text should carry the meaning
  • Don't put more than three or four badges in a row
  • Don't make a badge clickable. Use a Tag or a Button
  • Don't change what each variant means from page to page. Pick a color convention and keep it

Features

  • Fully rounded corners (`--radius-full`)
  • `--font-mono` at the body weight
  • Colored variants get a 6% tint of their color and a matching 1px border. `default` uses `--surface-hover`. All of them glow on hover

Preview

Default Primary Secondary Success Warning Error Info

Usage

<script type="module" src="@arclux/arc-ui"></script>

<div style="display: flex; align-items: center; gap: 12px; flex-wrap: wrap;">
  <arc-badge>Default</arc-badge>
  <arc-badge variant="primary">Primary</arc-badge>
  <arc-badge variant="secondary">Secondary</arc-badge>
  <arc-badge variant="success">Deployed</arc-badge>
  <arc-badge variant="warning">Pending</arc-badge>
  <arc-badge variant="error">Failed</arc-badge>
  <arc-badge variant="info">New</arc-badge>
</div>

<!-- Custom color -->
<arc-badge color="255, 165, 0">Custom</arc-badge>

API

colorstring''
Custom RGB color value (e.g. "255, 100, 50") that overrides the variant color. Sets the border, text, background tint, and hover glow to the specified color.
variant'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info''default'
Controls the badge color scheme. Default renders a neutral gray. Primary and secondary use the accent token colors. Success, warning, error, and info map to the corresponding semantic color tokens for status-oriented labels.
size'sm' | 'md' | 'lg''md'
Controls the badge size. Options: 'sm', 'md', 'lg'.

See also