# Badge A lightweight text widget for displaying short labels, statuses, and counts. ## Use cases - **Suitable**: marking a status or category in lists, cards, and forms - **Suitable**: showing a brief count or hint label - **Not suitable**: command controls that need to be clicked (use `button` instead) ## Usage ```tsx import { Badge } from "@lcui/react" ``` ```tsx Secondary ``` ## Variants Use the `variant` prop to switch between the preset badge appearances. ## With Icon Combining Icon and Text child widgets lets an icon and a label express a status or category together. Place the icon before the text for a leading icon, or after it for a trailing icon. Badge lays its children out in a row, keeps a fixed 20px height, and constrains the icon's font size to match the text, so no extra spacing or size classes are needed. ## Custom Colors Use the `color` prop or `ui_badge_set_color()` to apply a named color. ## API Reference