Appearance

The Badge component provides many predefined appearance options such as different shapes, sizes, theme colors and optional cutout borders.

Theme Color

The Badge allows you to specify predefined theme colors.The theme color will be applied as background and border color, while also amending the text color accordingly.

The available themeColor values are:

  • primary (Default)Applies coloring based on primary theme color.
  • secondaryApplies coloring based on secondary theme color.
  • tertiary Applies coloring based on tertiary theme color.
  • inherit Applies inherited coloring value.
  • infoApplies coloring based on info theme color.
  • success Applies coloring based on success theme color.
  • warning Applies coloring based on warning theme color.
  • error Applies coloring based on error theme color.
  • dark Applies coloring based on dark theme color.
  • light Applies coloring based on light theme color.
  • inverse Applies coloring based on inverted theme color.
Example
View Source
Edit In Stackblitz  
Change Theme:

Shape

The Badge allows you to set different shapes.

The available shape values are:

  • circle (Default)Applies circular shape on the Badge.
  • rectangleApplies rectangular shape on the Badge.
  • roundedApplies rounded shape on the Badge.
  • dotApplies dot shape on the Badge.
  • pillApplies border radius equal to half of the height of the Badge.
Example
View Source
Edit In Stackblitz  
Change Theme:

Size

The Badge allows you to set different sizes.

The available size values are:

  • small
  • medium (Default)
  • large
Example
View Source
Edit In Stackblitz  
Change Theme:

Fill

The Badge enables you to set styling options and create solid or outline badges by setting the fill property.

The available fill values are:

  • solid (Default)
  • outline
Example
View Source
Edit In Stackblitz  
Change Theme:

Cutout Border

The Badge allows you to specify whether or not to render an additional cutout border around its content by using the cutoutBorder property. By default, cutoutBorder is set to false.

Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?