Status Badge
A small badge that marks a navigation item or heading as new, in beta, or coming soon.
Navigation
StatusBadge is a small Badge with a 6px left margin, so it sits right after a label. It is blue unless you set type.
Answer Engine Insights
AgentsNew
SlidesBeta
ShoppingSoon
Types
type takes any Badge color. When the parent already spaces its children, pass className="ml-0" to remove the left margin.
NewLiveBetaLimitedDeprecatedSoon
Icon
iconStart adds an icon before the text, colored to match the badge. With neither text nor iconStart, the badge renders nothing, so you can pass optional values straight through.
Aim suggestionsAI
Agent AnalyticsLive
Enterprise reportsUpgrade
Installation
pnpm dlx shadcn@latest add @narakui/status-badgeAdd "@narakui": "https://ui.narakcode.dev/r/{name}.json" to components.json, or install directly from https://ui.narakcode.dev/r/status-badge.json.
Usage
import { StatusBadge } from '@/components/ui/status-badge';
<StatusBadge text="New" />
<StatusBadge text="Beta" type="purple" />
<StatusBadge text={item.badge} type={item.badgeType} iconStart={item.badgeIcon} />Properties
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | null | — | The label. |
type | 'default' | 'red' | 'blue' | 'green' | 'amber' | 'yellow' | 'purple' | 'orange' | 'gray' | 'cyan' | 'blue' | Badge color. |
iconStart | StatusBadgeIconValue | — | Icon before the text: an icon name, an icon descriptor, or an element. |
className | string | — | Additional CSS classes for the badge. Use ml-0 to remove the left margin. |
titleClassName | string | — | Additional CSS classes for the text. |