Skip to content

Badge

The Badge component is used to display small status descriptors, labels, or categorical information. They are visually distinct and help highlight specific information within a UI.

Add the Badge component to your project using the OrbitUI CLI:

Terminal window
npx orbitkit@latest add badge

Import the Badge component and use it in your Astro components or pages. Place the content you want inside the badge as children of the <Badge> component. This can be text, icons (like SVGs), or other inline elements.

Default
Outline

The Badge component accepts the following props, which are based on the badgeVariants defined using class-variance-authority:

PropTypeDefault
variantdefault, outlinecircular
roundednone, xs, sm, md, lg, xl, fullsm
sizexs, sm, md, lg, xlxs

This component accepts all the standard HTML attributes that a div or a element would.