Base Components

Tailwind CSS Badge

Custom badge component for highlighting and labeling purposes across various elements such as Tailwind CSS Button and Tailwind CSS Menu .

Default Badge

A basic example of Tailwind CSS Badge component with various color variants.
Default Primary Success Info Danger Warning Dark

Outline

Apply the custom class .badge-outline to set badges an outline style.
Default Primary Success Info Danger Warning Dark

Pill

Apply the custom class .badge-pill to set badges a pill style.
Default Outline

Sizes

Use the custom classes .badge-xs , .badge-sm , or .badge-lg to adjust the size of badges.
Extra small Small Default Large

With Dot

A custom badge example highlighted with a dot indicator element.
New New

Dot

Dot badge examples designed without accompanying text.

Hexagon

A custom badge example featuring KeenIcons displayed in an SVG hexagon shape.

Source Code

The following source file manages the CSS styles of the Tailwind CSS Badge component. Upon building the assets using Webpack Build Tools , the below file is compiled and added into the dist/assets/css/styles.css bundle, making it available globally across all pages.
File Description
src/core/plugins/components/badge.js The Tailwind CSS compatible plugin written in PostCSS for applying CSS styles to the Tailwind CSS Badge component.