Features
- Ten ready-made components — Banner, Header, Badge, Spinner, Table, Tabs, FooterHints, LoadingScreen, KeyValue, and SelectableRow, pre-styled and ready to drop in
- Design tokens included — a shared colour palette (
colors) and spacing scale (spacing) to keep every screen consistent - Full TypeScript support — ships compiled output with
.d.tsdeclarations for every component and token type - ESM only, zero config — no runtime bundling step; just import and render
- Peer-dependency light — only requires
ink ≥ 4andreact ≥ 18;ink-spinneris the sole production dependency
Install
npm install @kud/ink-uiink and react are peer dependencies and must be installed separately:
npm install ink reactUsage
import React from "react"
import { render } from "ink"
import { Banner, Header, Badge, Spinner, colors } from "@kud/ink-ui"
const App = () => (
<>
<Banner title="my-tool" subtitle="v1.0.0" />
<Header subtitle="Synchronising files…">Status</Header>
<Badge variant="success">done</Badge>
<Spinner label="Loading…" />
</>
)
render(<App />)All components accept only the props they need — no theme provider or context required. Design tokens are plain objects:
import { colors, spacing } from "@kud/ink-ui"
// colors.accent → "#FF8C00"
// colors.success → "green"
// spacing.md → 3Development
git clone https://github.com/kud/ink-ui.git
cd ink-ui
npm install
npm run devnpm run build compiles TypeScript to dist/. npm run dev runs the compiler in watch mode.