ink-ui

๐ŸŽจ Design Tokens

The shared colour palette and spacing scale that keep every screen consistent.

Every component is built on the same set of design tokens. Import colors, palette, priorityColors and spacing to keep your own components aligned with the design system.

import { colors, palette, priorityColors, spacing } from "@kud/ink-ui";
import type { Color, Palette, PriorityColor, Spacing } from "@kud/ink-ui";

๐ŸŒˆ Colours

TokenValueSemantic use
colors.accent#FF8C00Primary highlight, cursor, active tab
colors.secondary#999999Context beside the answer
colors.muted#75767EDimmed text, table headers
colors.dim#5C5E73Rules and separators only, never text
colors.success#5FD7A7Positive states, with โœ“ or a word
colors.error#FF5364Failures and errors, with โœ— or a word
colors.warning#FFB400Caution states, with โš  or a word
colors.info#89DDFFNeutral informational, with โ„น or a word
colors.pending#75767EQueued or waiting, no hue
colors.group#C792EAContainer header (an epic)
colors.ticket#FFCB6BTicket key, such as SHOP-1234
colors.pr#FF8C00PR or issue number, such as #123
colors.link#82AAFFLinks and URLs
colors.added#4ADE80Diff additions, such as +42
colors.removed#FF6B6BDiff deletions, such as -7
colors.selection#30364ASelected row ground
colors.track#2B323DUnfilled ground: progress track, skeleton bars
colors.trackHighlight#6B7480Skeleton shimmer crest

Every value is drawn from palette, tuned to the dark ground #1a1b27: dark-only, truecolour assumed, and chalk downsamples on a 256-colour terminal. priorityColors steps priority by lightness: highest and high #E4E4EC, medium #999999, low and lowest #75767E.

Color is the union of these token values, so you can type props that accept a palette colour.

import { Text } from "ink";
import { colors } from "@kud/ink-ui";

<Text color={colors.accent}>Highlighted</Text>;

๐Ÿ“ Spacing

TokenValueDescription
spacing.xs1Tight gap between inline elements
spacing.sm2Small margin between grouped items
spacing.md3Standard section margin
spacing.lg4Large gap between major sections

Spacing is the union of these values, suitable for Ink's margin, padding, and gap props.

import { Box } from "ink";
import { spacing } from "@kud/ink-ui";

<Box marginBottom={spacing.md}>โ€ฆ</Box>;

On this page