v0.1.0 — MIT Licence

Terminal UI that
feels intentional

Opinionated design-system library for Ink CLIs — pre-styled components and design tokens for a consistent terminal UI.

Get started View on GitHub
$ npm install @kud/ink-ui
5 Components
2 Token sets
MIT Licence
ESM Only

Why ink-ui

Everything you need for polished CLIs

Stop reinventing spinners and badge colours. ink-ui gives you a complete design system so every screen in your CLI looks and feels cohesive.

🧱

Five ready-made components

Banner, Header, Badge, Spinner, and Table — all pre-styled and immediately usable. No configuration required.

🎨

Design tokens included

A shared colour palette and spacing scale to keep every screen in your CLI consistent without guessing.

ESM only, zero config

Ships compiled TypeScript with full type definitions. Import and render — that's it. No build plugins or transforms needed.

🔒

Peer-dep friendly

Works with any Ink ≥ 4 and React ≥ 18 setup. No version lock-in. Drop it into an existing project without friction.

🧩

Composable by design

Every component accepts standard Ink primitives, so you can mix ink-ui with your own layouts freely.

🏷

Typed throughout

Exported types — BadgeVariant, Column, Color, Spacing — make props self-documenting in any IDE.


Quick Start

Up and running in minutes

Install the package, import the components you need, and render them inside your Ink app.

Step 1 — Install

sh
npm install @kud/ink-ui

# peer deps if not already installed
npm install ink react

Step 2 — Expected output

terminal
◆ My CLI v1.0.0

Dependencies
Fetching packages…

[installed] [outdated]

⠋ Loading…

Package              Version
ink                  5.0.0
react                18.3.1

Step 3 — Import and render

tsx
import React from "react"
import { render } from "ink"
import { Banner, Header, Badge, Spinner, Table } from "@kud/ink-ui"

const App = () => (
  <>
    <Banner title="My CLI" subtitle="v1.0.0" icon="◆" />

    <Header subtitle="Fetching packages…">Dependencies</Header>

    <Badge variant="success">installed</Badge>
    <Badge variant="warning">outdated</Badge>

    <Spinner label="Loading…" />

    <Table
      columns={[
        { key: "name", header: "Package", width: 20 },
        { key: "version", header: "Version", width: 10 },
      ]}
      data={[
        { name: "ink", version: "5.0.0" },
        { name: "react", version: "18.3.1" },
      ]}
    />
  </>
)

render(<App />)

Component Reference

Five components, ready to ship

Each component is pre-styled, fully typed, and composable with standard Ink primitives.

<Banner> Full-width title block ideal as an app header. Accepts title, subtitle, and icon props. The icon renders in accent colour. layout
<Header> Bold, underlined section heading to separate logical groups within a screen. Optional subtitle renders dimmed below the heading. layout
<Badge> Inline [label] tag with semantic colour variants: success, error, warning, info. Defaults to info. feedback
<Spinner> Animated dots spinner rendered in accent colour. Pass a label prop to show dimmed text beside the spinner. feedback
<Table> Structured data grid with bold muted column headers. Pass columns (key, header, width) and data arrays. Truncates long values cleanly. data

Design Tokens

Shared colour and spacing scale

Import colors and spacing to keep your own components aligned with the design system.

ts
import { colors, spacing } from "@kud/ink-ui"
colors
colors.accent
#FF8C00
colors.muted
gray
colors.success
green
colors.error
red
colors.warning
yellow
colors.info
cyan
spacing
spacing.xs
1 — tight gap between inline elements
spacing.sm
2 — small margin between grouped items
spacing.md
3 — standard section margin
spacing.lg
4 — large gap between major sections