ORIZEN/TUI

Badge

stable

Inline colored label with semantic variants driven by the theme.

Browser preview is a simulation. The copied component runs in actual terminal apps.

badge.tsx
[default][success][warning][error][info]

Installation

npx orizen-tui@latest add badge

if dependency install fails, run: npm install ink@^5.0.1 react@^18.3.1 @types/react@^18.3.18 orizen-tui-core@latest

Usage

badge.imports.tsx
badge.example.tsx

Examples

Variants

badge.example1.tsx
[default][success][warning][error][info]

API Reference

Badge

variant'default'
'default' | 'success' | 'warning' | 'error' | 'info'

Visual variant

children-
React.ReactNode

Badge content