Skip to Content
NarakUI

Status Badge

A small badge that marks a navigation item or heading as new, in beta, or coming soon.

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-badge

Add "@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

PropTypeDefaultDescription
textstring | null—The label.
type'default' | 'red' | 'blue' | 'green' | 'amber' | 'yellow' | 'purple' | 'orange' | 'gray' | 'cyan''blue'Badge color.
iconStartStatusBadgeIconValue—Icon before the text: an icon name, an icon descriptor, or an element.
classNamestring—Additional CSS classes for the badge. Use ml-0 to remove the left margin.
titleClassNamestring—Additional CSS classes for the text.