HomeGetting StartedColor SystemTypographySpacingIconographyLayoutInstallationUsageAngularBlazorReactSvelteVueThemingTypographyCustomizationCSS-Only ComponentsFormsIconsIllustrationsAccessibilityGlobal ConfigurationTailwind CSSSass LibraryForge MCP ServerDropdown OptionsFocus Indicator ClippingAll componentsButtonButton AreaChipFloating Action ButtonIcon ButtonSplit ButtonAutocompleteButton ToggleCalendarCheckboxChip FieldColor PickerDate PickerDate Range PickerFile PickerLabelRadioSelectSliderSwitchText FieldTime PickerApp BarApp LauncherDrawerMenuPaginatorSkip LinkStepperTabsView SwitcherAccordionApp LayoutCardDividerExpansion PanelScaffoldSplit ViewStackStructured CardToolbarBadgeBannerBusy IndicatorCircular ProgressDialogInline MessageLinear ProgressPage StateSkeletonToastTooltipAvatarIconKeyLabel ValueListMeterSecretTableTimelineTimestampTreeKeyboard ShortcutPopoverIntroductionColorTypographySpacingShapeBorderElevationLayeringAnimationUsageIcon LibraryBlocksRoadmapChangelogBlog

Badge

Badges display small amounts of non-interactive information like counts, status indicators, or notifications.

3ActiveFailed

Overview

Badges are used to highlight an item’s status for quick recognition. They are non-interactive and are typically used to convey information such as a count, status, or category.

Usage

forge-badge communicates a status, count, or short label through theme, strong, and dot. Reserve badges for glanceable, non-interactive information; reach for a chip instead when the element needs to support selection or filtering.

Rules

Do
Use consistent color meanings across your application so users can learn and recognize status patterns.Position badges consistently in relation to their associated content.Keep badge content to a word, short label, or number.Use the default, muted theme when many badges appear on screen, such as in a long table.Reserve strong for views where only a few badges need extra emphasis.Limit to one badge per record.
Don't
Don’t mix color meanings.Don't use a badge for a long phrase or sentence.Don't stack more than one badge on a single record.Don't use a badge for interactive selection or filtering — use a chip instead.Don’t override established color conventions without good reason.

Theme

Badges default to a neutral theme. Use a semantic theme — success, warning, error, info — to reinforce the meaning of the status being shown, or primary/secondary/tertiary to match the badge to its surrounding context.

Every theme in its default, muted appearance.

Strong

Set the strong attribute for a bolder fill when a badge needs to stand out. Reserve it for views where only a few badges are visible at once — overusing strong across a dense view defeats the emphasis.

The same themes rendered with strong for more visual weight.

With an icon

Pair a badge’s label with a leading icon via the start slot to reinforce its meaning.

An icon in the start slot reinforces the badge's label.

On an icon button

Pass a badge into an icon button’s badge slot to overlay a count, most often for unread or new content.

A numeric badge overlaid on an icon button.

Dot

Set dot to render the badge as a small dot with no visible content — useful for signaling unread content without a count.

A dot badge signals unread content without a count.

Badges display small amounts of non-interactive information like counts, status indicators, or notifications.

import "@tylertech/forge/badge";
Properties
PropertyAttributeTypeDefaultDescription
dot—booleanfalseControls whether the badge will be a small dot without any content visible.
theme—BadgeTheme'default'The theme of the badge.
strong—booleanfalseControls whether the badge will have a stronger visual appearance.
hide—booleanfalseControls whether the badge is visible.
Slots
NameDescription
(default)Default content placed inside the badge.
startContent placed before the default content.
endContent placed after the default content.
CSS Custom Properties
NameDescription
--forge-badge-backgroundThe background color.
--forge-badge-colorThe text color.
--forge-badge-shapeThe shape radius.
--forge-badge-padding-inlineThe inline padding.
--forge-badge-padding-blockThe block padding.
--forge-badge-border-widthThe border width.
--forge-badge-border-colorThe border color.
--forge-badge-border-styleThe border style.
--forge-badge-gapThe spacing between the content within the badge.

Color and contrast

A badge conveys status largely through color — pair that color with an icon or other visual cue for users with color vision deficiencies, and make sure its foreground text meets WCAG 2.2 contrast requirements against the background.

Loading Forge chat…