The page navigation is complete. You may now navigate the page content as you wish.
Skip to main content

Badge Count

A numeric label used to display things like version number or collection enumerations.

Use BadgeCount as a numeric label to display version numbers, collection counts in tabs, and similar information. For non-numeric information, use Badge.

Usage

When to use

  • To display version numbers (ie. “v1.2.0”), collection counts in tabs, and similar information.

When not to use

  • To display non-numeric information, consider Badge.

Type

There are three types of BadgeCounts: filled, inverted, and outlined.

3
3
3

Color

There are two colors: neutral, and neutral-dark-mode.

3
3

Size

There are three sizes: small, medium, and large.

3
3
3

How to use this component

Basic

The most basic invocation requires the text argument to be passed. By default, a filled, medium size, neutral color badgeCount is generated.

3
<Hds::BadgeCount @text="3" />

Type

A different type of badgeCount can be invoked using the type argument.

3
<Hds::BadgeCount @text="3" @type="inverted" />

Size

A different size of badgeCount can be invoked using the size argument.

3
<Hds::BadgeCount @text="3" @size="large" />

Color

A different color of badgeCount can be invoked using the color argument.

3
<Hds::BadgeCount @text="3" @color="neutral-dark-mode" />

Component API

Name
size
Type
enum
Values
  • small
  • medium (default)
  • large
Name
type
Type
enum
Values
  • filled (default)
  • inverted
  • outlined
Name
color
Type
enum
Values
  • neutral (default)
  • neutral-dark-mode
Name
text
Type
string
Description
The text value that should go in the badge counter.
Name
…attributes
Description
This component supports use of ...attributes.

Conformance rating

Conformant

When used as recommended, there should not be any accessibility issues with this component.

Support

If any accessibility issues have been found within this component, please let us know by submitting an issue.