Reactolith UI Getting Started Introduction Installation Usage Layout Aspect Ratio Card Resizable Scroll Area Separator Direction Provider Forms Button Button Group Calendar Checkbox Combobox Field Input Input Group Input OTP Label Native Select Radio Group Select Slider Switch Textarea Toggle Toggle Group Data Display Accordion Avatar Badge Carousel Chart Collapsible Item Kbd Table Feedback Alert Empty Progress Skeleton Sonner Spinner Overlay Alert Dialog Context Menu Dialog Dropdown Menu Hover Card Popover Sheet Tooltip Navigation Breadcrumb Command Menubar Navigation Menu Pagination Sidebar Tabs

Badge

Displays a badge or a component that looks like a badge.

Preview

Default Secondary Outline Destructive Ghost

Usage

<div class="flex flex-wrap items-center gap-2">
  <ui-badge>Default</ui-badge>
  <ui-badge variant="secondary">Secondary</ui-badge>
  <ui-badge variant="outline">Outline</ui-badge>
  <ui-badge variant="destructive">Destructive</ui-badge>
  <ui-badge variant="ghost">Ghost</ui-badge>
</div>

Sub-components

<ui-badge>

Props

<ui-badge>

PropTypeDefaultDescription
variant"default" | "secondary" | "destructive" | "outline" | "ghost" | "link""default"The visual style variant.

All components also accept standard HTML attributes (class, id, style, data-*, aria-*, etc.) which are passed through to the underlying element.