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 and spacing to keep your own components aligned with the design system.

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

๐ŸŒˆ Colours

TokenValueSemantic use
colors.accent#FF8C00Primary highlight, icons, spinners
colors.mutedgrayDimmed text, table headers
colors.successgreenPositive states
colors.errorredFailures and errors
colors.warningyellowCaution states
colors.infocyanNeutral informational

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