Free and open-source React badge group components built for modern applications and websites. These badge groups are built using React Aria and styled with Tailwind CSS.
Installation
You can add this badge group component using our CLI or manually:
npx untitledui@latest add badge-groups
Badge group examples
Below are examples and variations of this badge group component:
API reference
BadgeGroup
Import BadgeGroup from @/components/base/badges/badge-groups. Renders a <div> element.
FAQs
Please refer to our frequently asked questions page for more.
Badge groups support "brand", "gray", "error", "warning" and "success". The color prop is required by the TypeScript props type, and falls back to "brand" at runtime if it's missing.
The theme prop accepts "light" (the default) or "modern". "light" renders a tinted pill in the chosen color. "modern" renders a neutral badge (bg-primary) with a border and adds a small dot in the chosen color, so color only affects the dot.
Set align="trailing". The default "leading" places the addonText badge before the message and the arrow icon at the end; "trailing" places the message first and moves the icon inside the addon badge.
Badge groups support two sizes: "md" and "lg". Set them with the size prop. The default is "md".
The iconTrailing prop defaults to the ArrowRight icon from @untitledui/icons. Pass a different icon component or a React element to replace it, or pass null to hide it.
BadgeGroup renders a div with hover styles and a pointer cursor, but it has no href or onClick prop. Wrap it in an a tag or your router's link component to make it navigate.