Skip to Content
NarakUI

Badge

A compact status label with color, size, and icon variations.

Colors

default is an outline on a transparent background, so it takes the color of the surface under it. Use it on primary surfaces such as cards, tables, and pages.

defaultredbluegreenamberyellowpurpleorangegraycyan

Sizes

microsmalldefaultlarge

Icon and tooltip

iconStart takes an icon name or React node. tooltip wraps the badge in a tooltip.

ReadyNeeds reviewFailedTracked

Agent Builder variant

Borderless squared badges used on the Agent Builder canvas, such as the Beta and Internal labels on node headers. This variant has no yellow style, so type="yellow" renders an unstyled label; use amber instead.

defaultredbluegreenamberpurpleorangegraycyan

Installation

pnpm dlx shadcn@latest add @narakui/badge

Add "@narakui": "https://ui.narakcode.dev/r/{name}.json" to components.json, or install directly from https://ui.narakcode.dev/r/badge.json.

Properties

PropTypeDefaultDescription
titleReactNodeRequiredBadge label.
type'default' | 'red' | 'blue' | 'green' | 'amber' | 'yellow' | 'purple' | 'orange' | 'gray' | 'cyan''default'Color treatment.
size'micro' | 'small' | 'default' | 'large''default'Padding and type scale.
variant'default' | 'agent-builder''default'Rounded bordered badge or the borderless Agent Builder badge.
fontWeight'medium' | 'regular''medium'Label weight.
iconStartIconValue—Icon shown before the label, tinted to match the type.
tooltipstring—Tooltip content shown on hover.
classNamestring—Additional classes for the badge.
titleClassNamestring—Additional classes for the label.