$ Badge

static output5 presets

Colored inline labels and tags for terminal output. Includes preset styles, outline badges, dot indicators, and fully custom colors.

# Preview

badge demo
Preset badges:
PASS FAIL WARN INFO N/A
Outline badges:
[typescript] [node.js] [v1.0.0] [MIT]
Status indicators:
Production    Staging    Development    Offline
Custom badges:
DEPLOY RELEASE HOTFIX

# Usage

example.ts
import { Badge, badge, fg, bg } from "@vr_patel/tui";

// Preset badges
console.log(Badge.success("PASS"));
console.log(Badge.error("FAIL"));
console.log(Badge.warning("WARN"));
console.log(Badge.info("INFO"));
console.log(Badge.neutral("N/A"));

// Outline style
console.log(Badge.outline("v2.1.0", fg.blue));
console.log(Badge.outline("typescript", fg.cyan));

// Status dot indicator
console.log(Badge.status("Online", fg.green));
console.log(Badge.status("Offline", fg.red));

// Custom colors
console.log(Badge.custom("DEPLOY", fg.black, bg.brightMagenta));

# API

PropTypeDefaultDescription
textstringrequiredBadge label text
presetBadgePresetrequiredsuccess | error | warning | info | neutral
boldbooleantrueBold text style
roundedbooleantrueAdd padding for pill-like appearance