# Introduction Copy-paste terminal UI components for React. Built on Ink and OpenTUI, works with the shadcn CLI. **termcn** provides beautifully designed, accessible, and customizable terminal UI components. Built on [Ink](https://github.com/vadimdemedes/ink) and [OpenTUI](https://github.com/anomalyco/opentui), and designed to work seamlessly with the [shadcn CLI](https://ui.shadcn.com). Philosophy [#philosophy] termcn follows the shadcn model for terminal UIs: copy-paste components you can own, with zero lock-in and sensible defaults that work immediately. Terminal apps are often treated as afterthoughts — bolted together with ad-hoc formatting and inconsistent styling. termcn takes a different approach. It stays close to each renderer's primitives, keeps the API familiar, and lets you drop down to raw Ink or OpenTUI components whenever you need more control. The goal is simple: make terminal UIs feel like the rest of your stack — composable, themeable, accessible, and easy to customize. Why termcn? [#why-termcn] Most terminal component setups are either too opinionated or too scattered. termcn is built for teams that want to ship quickly without giving up control: * **Own Your Code:** Copy the components into your project and customize everything. * **Start Fast:** Run one command and render your first terminal UI with production-ready defaults. * **Scale Safely:** Build on top of Ink or OpenTUI directly, then drop to raw APIs when needed. Any Terminal Style [#any-terminal-style] termcn works with any terminal that supports ANSI escape codes and Unicode. This means your components look great everywhere: * [iTerm2](https://iterm2.com) — Full Unicode and true color support on macOS * [Kitty](https://sw.kovidgoyal.net/kitty/) — GPU-accelerated with image protocol support * [Alacritty](https://alacritty.org) — Fast, cross-platform, GPU-accelerated * [Windows Terminal](https://github.com/microsoft/terminal) — Modern terminal for Windows * [Ghostty](https://ghostty.org) — Modern, GPU-accelerated terminal emulator * And any other terminal with ANSI/Unicode support Features [#features]
# Installation Install terminal components, hooks, and themes from the registry. Prerequisites [#prerequisites] A project with [Ink](https://github.com/vadimdemedes/ink) or [OpenTUI](https://github.com/anomalyco/opentui) set up. Installation [#installation] Run the following command to add any component: ```bash npx shadcn@latest add @termcn/ink/spinner ``` OpenTUI components use the `opentui/` namespace: ```bash npx shadcn@latest add @termcn/opentui/spinner ``` Usage [#usage] Import and use the component: ```tsx import { Spinner } from "@/components/ui/spinner"; import { Text } from "ink"; export function App() { return ( <> Loading... ); } ``` Install a Theme [#install-a-theme] termcn ships bundled terminal themes that integrate with the `ThemeProvider`: For Ink: ```bash npx shadcn@latest add @termcn/ink/theme-provider ``` For OpenTUI: ```bash npx shadcn@latest add @termcn/opentui/theme-provider ``` Providers install into `providers/`. Wrap your app only when you want to override the default theme: ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { draculaTheme } from "@/lib/terminal-themes/dracula"; export function App() { return ; } ``` Motion and Unicode overrides are separate optional items: ```bash npx shadcn@latest add @termcn/ink/motion-provider @termcn/ink/unicode-provider ``` Use the `opentui/` namespace for the equivalent OpenTUI providers. # MCP Learn how to use the shadcn MCP (Model Context Protocol) server with termcn. [MCP](https://modelcontextprotocol.io/) is an open protocol that standardizes how applications provide context to LLMs. The shadcn CLI can register an MCP server so your editor can discover registry components—including items you install from **termcn** via the same CLI. Configure MCP [#configure-mcp] Run: ```bash npx shadcn@latest mcp init ``` Choose your MCP client when prompted, then enable the MCP server in that client to finish setup. Usage [#usage] With MCP enabled, you can ask your IDE to work with **Ink** and **OpenTUI** terminal UI patterns and termcn registry components. Example prompts: * Build a CLI status screen with **Spinner**, **ProgressBar**, and **StatusMessage**. * Add a **CommandPalette** and **Menu** for keyboard-driven navigation in a terminal app. * Create an AI-style flow with **ChatThread**, **ChatMessage**, **ToolCall**, and **StreamingText**. * Lay out a TUI dashboard using **Box**, **Stack**, **Table**, and **DataGrid** with a **Sidebar**. * Implement a multi-step flow with **Wizard**, **Form**, **Confirm**, and **Modal**. Install components from this registry with `npx shadcn@latest add` and the JSON URL from each docs page. Components work with provider-optional hooks and sensible defaults. Add `ThemeProvider`, `MotionProvider`, or `UnicodeProvider` only when the application needs an override. # Registry Learn how to use the termcn registry with the shadcn CLI. The **termcn** registry ships Ink and OpenTUI components, hooks, providers, and themes in the [shadcn registry format](https://ui.shadcn.com/docs/registry). Register the namespace once in `components.json`, then pull items by name with the CLI. Setup [#setup] Add a **registries** entry for this site. See the [shadcn registry documentation](https://ui.shadcn.com/docs/registry) for all `components.json` fields and behaviors. ```json { "registries": { "@termcn": "https://termcn.dev/r/{name}.json" } } ``` You can replace `@termcn` with another namespace; it only needs to match what you pass to `shadcn add`. Usage [#usage] Items are namespaced by base: `ink/` for Ink and `opentui/` for OpenTUI. Registry files follow these destinations: * Components install into `components/ui/`. * Hooks install into the configured `hooks/` directory. * Theme, motion, and Unicode providers install into `providers/`. * Themes install into `lib/terminal-themes/`. Components declare their hook dependencies, so installing a component does not install or require a provider. Ink [#ink] Install a component: ```bash npx shadcn@latest add @termcn/ink/spinner ``` Install a theme: ```bash npx shadcn@latest add @termcn/ink/theme-dracula ``` Install the theme provider: ```bash npx shadcn@latest add @termcn/ink/theme-provider ``` Install the motion provider: ```bash npx shadcn@latest add @termcn/ink/motion-provider ``` Install the unicode provider: ```bash npx shadcn@latest add @termcn/ink/unicode-provider ``` Without a registry alias, use the full URL (as on each docs page): ```bash npx shadcn@latest add https://termcn.dev/r/ink/spinner.json ``` OpenTUI [#opentui] Install a component: ```bash npx shadcn@latest add @termcn/opentui/spinner ``` Install a theme: ```bash npx shadcn@latest add @termcn/opentui/theme-dracula ``` Install the theme provider: ```bash npx shadcn@latest add @termcn/opentui/theme-provider ``` Install the motion provider: ```bash npx shadcn@latest add @termcn/opentui/motion-provider ``` Install the unicode provider: ```bash npx shadcn@latest add @termcn/opentui/unicode-provider ``` Without a registry alias, use the full URL (as on each docs page): ```bash npx shadcn@latest add https://termcn.dev/r/opentui/spinner.json ``` # Charts Terminal-native charts and data visualizations for Ink and OpenTUI. Basic [#basic] Dither [#dither] # Components Here you can find all the terminal components available in the library. Layout [#layout] Typography [#typography] Input [#input] Selection [#selection] Data [#data] Feedback [#feedback] Navigation [#navigation] Overlays [#overlays] Forms [#forms] Utility [#utility] AI [#ai] # Templates Pre-built full-screen templates and layouts for common terminal app patterns. # Themes Here you can find all the terminal themes available in the library. # 5 April 2026 - Initial Release Initial release focused on Ink with 113 components and templates in total, plus a separate theme system. We shipped the initial release of termcn focused on [Ink](https://term.ink), with 113 components and templates and 10+ themes.
# 4 May 2026 - More Themes Expanded the terminal theme catalog to 30 themes, including AMOLED, Aura, Ayu, and many more. We expanded the terminal theme catalog to 30 themes. # 26 May 2026 - OpenTUI Support Added OpenTUI support across the registry and documentation, enabling OpenTUI-based terminal UI components and previews. We added [OpenTUI](https://opentui.com) support across the registry and documentation, making it possible to build and preview terminal UIs with it.
# 16 July 2026 - Dither Charts for Ink and OpenTUI Added six terminal-native dither chart families for Ink and OpenTUI, with composable primitives, interaction, motion, and accessible fallbacks. We shipped Dither Charts for both Ink and OpenTUI: a terminal-native visualization system that uses density, texture, and color to make data legible in character cells. The release includes composable [area](/docs/charts/ink/dither-area), [bar](/docs/charts/ink/dither-bar), [line](/docs/charts/ink/dither-line), [pie and donut](/docs/charts/ink/dither-pie), [radar](/docs/charts/ink/dither-radar), and [sparkline](/docs/charts/ink/dither-sparkline) components. Every chart family is also available through the corresponding [OpenTUI collection](/docs/charts/opentui/dither-area). Charts support axes, grids, dots, legends, tooltips, grouped and stacked data, percent layouts, bloom effects, animated entrances, and keyboard-driven inspection and selection. They also include no-color, ASCII, reduced-motion, and screen-reader-friendly output paths for less capable or nonvisual terminal environments. Install a chart directly from registry: For Ink: ```bash npx shadcn@latest add @termcn/ink/dither-area-chart ``` For OpenTUI: ```bash npx shadcn@latest add @termcn/opentui/dither-area-chart ``` # 3 August 2026 - Accessibility improvements for Ink Improved Ink keyboard interaction, focus behavior, readable status output, motion and Unicode fallbacks, and nonvisual output. We completed an accessibility-focused pass across the Ink component collection. The implementation follows Ink's terminal accessibility contract instead of presenting terminal accessibility as browser accessibility or making a general WCAG-conformance claim. Ink [#ink] Ink components now use the closest supported native role and state, contextual labels, focus-gated input handling, and predictable keyboard traversal. Interactive overlays contain and restore focus, while visual-only output such as charts, QR codes, big text, gradients, cursors, and animation frames exposes concise text alternatives in screen-reader mode. Text editing and responsive output account for graphemes, wide characters, terminal-cell width, and terminal resizing. Animation work is also suspended for screen-reader, reduced-motion, inactive, and CI states. Provider architecture [#provider-architecture] Theme, motion, and Unicode configuration now use separate provider and hook registry items in both the Ink and OpenTUI collections. Components depend on the provider-optional hooks, so installing a component does not force an application-level provider. This is an architecture consistency change for OpenTUI, not a claim that this release completed the same accessibility pass for OpenTUI. Ink components continue to ship as source-owned, standalone registry items. Consumers can install only the component and its declared dependencies, inspect the implementation, and adapt labels, keyboard behavior, rendering, and terminal-specific fallbacks to their application. # Changelog Latest updates and announcements for termcn. 3 August 2026 - Accessibility improvements for Ink [#3-august-2026---accessibility-improvements-for-ink] We improved keyboard interaction, focus behavior, readable status output, motion and Unicode fallbacks, and nonvisual output across the Ink component collection. Theme, motion, and Unicode configuration now also use separate provider and hook items in both registries. 16 July 2026 - Dither Charts for Ink and OpenTUI [#16-july-2026---dither-charts-for-ink-and-opentui] We shipped six terminal-native chart families for Ink and OpenTUI, with composable primitives, keyboard interaction, motion, and accessible fallback output. 26 May 2026 - OpenTUI Support [#26-may-2026---opentui-support] We added OpenTUI support across the registry and documentation, making it possible to build and preview terminal UIs with OpenTUI alongside Ink. 4 May 2026 - More Themes [#4-may-2026---more-themes] We expanded the terminal theme catalog to 30 themes, including [Amoled](/themes/amoled), [Aura](/themes/aura), [Ayu](/themes/ayu), and many more. 5 April 2026 - Initial Release [#5-april-2026---initial-release] We shipped the initial release of termcn focused on Ink, with 113 components and templates in total and a separate theme system. Follow [termcn on GitHub](https://github.com/termcn/termcn) for source history and future tagged releases. # Theming Configure terminal themes, motion, and Unicode behavior for terminal apps. ThemeProvider [#themeprovider] Ink components use the default theme without a provider. Install `ThemeProvider` when you want to supply another theme or update the active theme at runtime. ```bash npx shadcn@latest add @termcn/ink/theme-provider ``` Usage [#usage] ```tsx import { Spinner } from "@/components/ui/spinner"; import { defaultTheme } from "@/lib/terminal-themes/default"; import { ThemeProvider } from "@/providers/theme-provider"; export function Example() { return ( ); } ``` Theme-aware components receive the provider-optional `use-theme` hook transitively. Application code can import `useTheme` or `useThemeUpdater` from `@/hooks/use-theme` when it needs direct access. Available themes [#available-themes] Custom themes [#custom-themes] Use `createTheme` to extend the default tokens while preserving the complete theme shape. ```tsx import { createTheme } from "@/providers/theme-provider"; export const oceanTheme = createTheme({ name: "ocean", colors: { primary: "#0ea5e9", accent: "#22d3ee", background: "#0f172a", foreground: "#e2e8f0", }, }); ``` MotionProvider [#motionprovider] Motion is independent from the active theme. Install `MotionProvider` only when the application needs to override the default reduced-motion detection. ```bash npx shadcn@latest add @termcn/ink/motion-provider ``` Usage [#usage-1] ```tsx import { MotionProvider } from "@/providers/motion-provider"; export function Example() { return ( ); } ``` Without the provider, motion follows `NO_MOTION=1` and `CI=true`. UnicodeProvider [#unicodeprovider] Unicode support is independent from the active theme. Install `UnicodeProvider` only when the application needs to override terminal detection. ```bash npx shadcn@latest add @termcn/ink/unicode-provider ``` Usage [#usage-2] ```tsx import { UnicodeProvider } from "@/providers/unicode-provider"; export function Example() { return ( ); } ``` Without the provider, Unicode support follows terminal detection and `NO_UNICODE=1`. # Theming Configure terminal themes, motion, and Unicode behavior for terminal apps. ThemeProvider [#themeprovider] OpenTUI components use the default theme without a provider. Install `ThemeProvider` when you want to supply another theme or update the active theme at runtime. ```bash npx shadcn@latest add @termcn/opentui/theme-provider ``` Usage [#usage] ```tsx import { Spinner } from "@/components/ui/spinner"; import { defaultTheme } from "@/lib/terminal-themes/default"; import { ThemeProvider } from "@/providers/theme-provider"; export function Example() { return ( ); } ``` Theme-aware components receive the provider-optional `use-theme` hook transitively. Application code can import `useTheme` or `useThemeUpdater` from `@/hooks/use-theme` when it needs direct access. Available themes [#available-themes] Custom themes [#custom-themes] Use `createTheme` to extend the default tokens while preserving the complete theme shape. ```tsx import { createTheme } from "@/providers/theme-provider"; export const oceanTheme = createTheme({ name: "ocean", colors: { primary: "#0ea5e9", accent: "#22d3ee", background: "#0f172a", foreground: "#e2e8f0", }, }); ``` MotionProvider [#motionprovider] Motion is independent from the active theme. Install `MotionProvider` only when the application needs to override the default reduced-motion detection. ```bash npx shadcn@latest add @termcn/opentui/motion-provider ``` Usage [#usage-1] ```tsx import { MotionProvider } from "@/providers/motion-provider"; export function Example() { return ( ); } ``` Without the provider, motion follows `NO_MOTION=1` and `CI=true`. UnicodeProvider [#unicodeprovider] Unicode support is independent from the active theme. Install `UnicodeProvider` only when the application needs to override terminal detection. ```bash npx shadcn@latest add @termcn/opentui/unicode-provider ``` Usage [#usage-2] ```tsx import { UnicodeProvider } from "@/providers/unicode-provider"; export function Example() { return ( ); } ``` Without the provider, Unicode support follows terminal detection and `NO_UNICODE=1`. # Bar Chart Horizontal and vertical bar chart with labels Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/bar-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { BarChart } from "@/components/ui/bar-chart"; ``` ```tsx ``` API Reference [#api-reference] BarChart [#barchart] | Prop | Type | Default | | ------------ | ---------------------------- | -------------- | | `data` | `BarChartItem[]` | `required` | | `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | | `width` | `number` | `30` | | `height` | `number` | `10` | | `showValues` | `boolean` | `true` | | `title` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Dither Area Chart Composable dithered area charts with layered fills, dots, axes, stacking, bloom, and keyboard interaction Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/dither-area-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Area, AreaChart, Grid, Legend, Tooltip, XAxis, YAxis, } from "@/components/ui/dither-area-chart"; import type { ChartConfig } from "@/components/ui/dither-area-chart"; ``` ```tsx const data = [ { month: "Jan", desktop: 38, mobile: 22 }, { month: "Feb", desktop: 52, mobile: 31 }, { month: "Mar", desktop: 47, mobile: 35 }, ]; const config = { desktop: { color: "blue", label: "Desktop" }, mobile: { color: "pink", label: "Mobile" }, } satisfies ChartConfig; ; ``` Examples [#examples] Fill variants [#fill-variants] Set `variant` on each `Area` to choose a gradient, dotted, hatched, or solid fill. Stacking modes [#stacking-modes] Use `stackType="stacked"` for cumulative values or `stackType="percent"` for normalized proportions. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | ----------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `stackType` | `"default" \| "stacked" \| "percent"` | `"default"` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `markerIndex` | `number \| null` | `null` | | `interactive` | `boolean` | `true` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Use left/right to inspect points, up/down to focus a series, Enter to select, Escape to clear, and R to replay animation. H/J/K/L are supported too. Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys or `h` / `j` / `k` / `l` move through the chart; `Enter` / `Space` select a point; `Escape` clears the active point; `r` restarts enabled animation. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Dither Bar Chart Dithered grouped, stacked, and percent bar charts with terminal-native textures and interaction Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/dither-bar-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Bar, BarChart, Grid, Legend, Tooltip, XAxis, YAxis, } from "@/components/ui/dither-bar-chart"; import type { ChartConfig } from "@/components/ui/dither-bar-chart"; ``` ```tsx const data = [ { month: "Jan", direct: 34, search: 18 }, { month: "Feb", direct: 47, search: 24 }, { month: "Mar", direct: 42, search: 29 }, ]; const config = { direct: { color: "green", label: "Direct" }, search: { color: "purple", label: "Search" }, } satisfies ChartConfig; ; ``` Examples [#examples] Bar textures [#bar-textures] Set `variant` on a `Bar` to render gradient, dotted, hatched, or solid cells. Stacking modes [#stacking-modes] Switch between cumulative stacks and normalized percent stacks with `stackType`. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | ----------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `stackType` | `"default" \| "stacked" \| "percent"` | `"default"` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `interactive` | `boolean` | `true` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | `width` is the preferred maximum. The chart clamps itself to the current Ink stdout width when the terminal is narrower. Arrow keys or H/J/K/L navigate chart state; Enter selects clickable series and Escape clears the active point. Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys or `h` / `j` / `k` / `l` move through the chart; `Enter` / `Space` select a point; `Escape` clears the active point; `r` restarts enabled animation. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Dither Line Chart Dithered multi-series line charts with solid or dashed strokes, markers, axes, and terminal interaction Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/dither-line-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ActiveDot, Dot, Grid, Line, LineChart, Tooltip, XAxis, YAxis, } from "@/components/ui/dither-line-chart"; import type { ChartConfig } from "@/components/ui/dither-line-chart"; ``` ```tsx const data = [ { month: "Jan", latency: 24 }, { month: "Feb", latency: 31 }, { month: "Mar", latency: 27 }, ]; const config = { latency: { color: "purple", label: "Latency" }, } satisfies ChartConfig; ; ``` Examples [#examples] Stroke and marker variants [#stroke-and-marker-variants] Use `strokeVariant` for solid or dashed lines. `Dot` and `ActiveDot` control regular and inspected markers independently. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | -------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `markerIndex` | `number \| null` | `null` | | `interactive` | `boolean` | `true` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Keyboard controls match the area chart: arrows or H/J/K/L navigate, Enter selects a series, Escape clears, and R replays enabled motion. Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys or `h` / `j` / `k` / `l` move through the chart; `Enter` / `Space` select a point; `Escape` clears the active point; `r` restarts enabled animation. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Dither Pie Chart Dithered pie and donut charts with textured slices, legends, tooltips, and keyboard inspection Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/dither-pie-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Legend, Pie, PieChart, Tooltip, } from "@/components/ui/dither-pie-chart"; import type { ChartConfig } from "@/components/ui/dither-pie-chart"; ``` ```tsx const data = [ { channel: "direct", value: 42 }, { channel: "search", value: 31 }, { channel: "social", value: 17 }, ]; const config = { direct: { color: "blue", label: "Direct" }, search: { color: "green", label: "Search" }, social: { color: "pink", label: "Social" }, } satisfies ChartConfig; ; ``` Examples [#examples] Textures and donut shapes [#textures-and-donut-shapes] All four fill variants work for pies and donuts. Set `innerRadius` between `0` and `0.92` to open the center. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------- | -------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `dataKey` | `string` | required | | `nameKey` | `string` | required | | `innerRadius` | `number` from `0` to `0.92` | `0` | | `width` | `number` | `56` | | `height` | `number` | `12` | | `markerIndex` | `number \| null` | `null` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Use left/right to inspect slices and up/down to focus legend entries. Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys or `h` / `j` / `k` / `l` move through the chart; `Enter` / `Space` select a point; `Escape` clears the active point; `r` restarts enabled animation. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Dither Radar Chart Dithered radar charts for comparing multiple series across terminal-friendly radial axes Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/dither-radar-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Legend, Radar, RadarChart, Tooltip, } from "@/components/ui/dither-radar-chart"; import type { ChartConfig } from "@/components/ui/dither-radar-chart"; ``` ```tsx const data = [ { metric: "Speed", desktop: 82, mobile: 68 }, { metric: "Quality", desktop: 74, mobile: 79 }, { metric: "Reach", desktop: 66, mobile: 88 }, { metric: "Trust", desktop: 91, mobile: 72 }, ]; const config = { desktop: { color: "blue", label: "Desktop" }, mobile: { color: "pink", label: "Mobile" }, } satisfies ChartConfig; ; ``` Examples [#examples] Fill variants [#fill-variants] Choose gradient, dotted, hatched, or solid polygon fills independently for each radar series. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | -------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `nameKey` | `string` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `markerIndex` | `number \| null` | `null` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | The standard chart keyboard controls inspect axes, focus series, and replay enabled entrance motion. Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys or `h` / `j` / `k` / `l` move through the chart; `Enter` / `Space` select a point; `Escape` clears the active point; `r` restarts enabled animation. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Dither Sparkline Compact dithered sparklines for terminal dashboards, summaries, and inline metrics Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/dither-sparkline ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Sparkline } from "@/components/ui/dither-sparkline"; ``` ```tsx ``` Examples [#examples] Fill and marker variants [#fill-and-marker-variants] Sparklines support every dither fill. Add `markerIndex` to highlight a specific sample without enabling interaction. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | ------------ | | `data` | `number[]` | required | | `color` | `string` | required | | `width` | `number` | `24` | | `height` | `number` | `4` | | `variant` | `"gradient" \| "dotted" \| "hatched" \| "solid"` | `"gradient"` | | `markerIndex` | `number \| null` | `null` | | `animate` | `boolean` | `false` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys or `h` / `j` / `k` / `l` move through the chart; `Enter` / `Space` select a point; `Escape` clears the active point; `r` restarts enabled animation. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Gauge Arc/speedometer gauge meter Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/gauge ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Gauge } from "@/components/ui/gauge"; ``` ```tsx ``` API Reference [#api-reference] Gauge [#gauge] | Prop | Type | Default | | ------- | ---------------------- | ---------- | | `value` | `number` | `required` | | `min` | `number` | `0` | | `max` | `number` | `100` | | `label` | `string` | - | | `color` | `string` | - | | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Heat Map Grid heatmap with color intensity scale Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/heat-map ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { HeatMap } from "@/components/ui/heat-map"; ``` ```tsx ``` API Reference [#api-reference] HeatMap [#heatmap] | Prop | Type | Default | | ------------ | ------------ | --------------------- | | `data` | `number[][]` | `required` | | `rowLabels` | `string[]` | - | | `colLabels` | `string[]` | - | | `colorScale` | `string[]` | `DEFAULT_COLOR_SCALE` | | `cellWidth` | `number` | `5` | | `showValues` | `boolean` | `false` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Charts Components for rendering charts and data visualizations in the terminal. Basic [#basic] Dither [#dither] # Line Chart ASCII line chart with axes and multi-series support Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/line-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { LineChart } from "@/components/ui/line-chart"; ``` ```tsx ``` API Reference [#api-reference] LineChart [#linechart] | Prop | Type | Default | | ---------- | ------------------------------------------------- | ---------- | | `data` | `(number \| { label?: string; value: number })[]` | `required` | | `width` | `number` | `40` | | `height` | `number` | `10` | | `title` | `string` | - | | `color` | `string` | - | | `showAxes` | `boolean` | `true` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Pie Chart Unicode block pie chart with legend Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/pie-chart ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { PieChart } from "@/components/ui/pie-chart"; ``` ```tsx ``` API Reference [#api-reference] PieChart [#piechart] | Prop | Type | Default | | ----------------- | ---------------- | ---------- | | `data` | `PieChartItem[]` | `required` | | `radius` | `number` | `5` | | `showLegend` | `boolean` | `true` | | `showPercentages` | `boolean` | `true` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Sparkline Inline Unicode braille sparkline chart Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/sparkline ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Sparkline } from "@/components/ui/sparkline"; ``` ```tsx ``` API Reference [#api-reference] Sparkline [#sparkline] | Prop | Type | Default | | ------- | ---------- | ---------- | | `data` | `number[]` | `required` | | `width` | `number` | `20` | | `color` | `string` | - | | `label` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Bar Chart Horizontal and vertical bar chart with labels Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/bar-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { BarChart } from "@/components/ui/bar-chart"; ``` ```tsx ``` API Reference [#api-reference] BarChart [#barchart] | Prop | Type | Default | | ------------ | ---------------------------- | -------------- | | `data` | `BarChartItem[]` | `required` | | `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | | `width` | `number` | `30` | | `height` | `number` | `10` | | `showValues` | `boolean` | `true` | | `title` | `string` | - | # Dither Area Chart Composable dithered area charts with layered fills, dots, axes, stacking, bloom, and keyboard interaction Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/dither-area-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Area, AreaChart, Grid, Legend, Tooltip, XAxis, YAxis, } from "@/components/ui/dither-area-chart"; import type { ChartConfig } from "@/components/ui/dither-area-chart"; ``` ```tsx const data = [ { month: "Jan", desktop: 38, mobile: 22 }, { month: "Feb", desktop: 52, mobile: 31 }, { month: "Mar", desktop: 47, mobile: 35 }, ]; const config = { desktop: { color: "blue", label: "Desktop" }, mobile: { color: "pink", label: "Mobile" }, } satisfies ChartConfig; ; ``` Examples [#examples] Fill variants [#fill-variants] Set `variant` on each `Area` to choose a gradient, dotted, hatched, or solid fill. Stacking modes [#stacking-modes] Use `stackType="stacked"` for cumulative values or `stackType="percent"` for normalized proportions. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | ----------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `stackType` | `"default" \| "stacked" \| "percent"` | `"default"` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `markerIndex` | `number \| null` | `null` | | `interactive` | `boolean` | `true` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Use left/right to inspect points, up/down to focus a series, Enter to select, Escape to clear, and R to replay animation. H/J/K/L are supported too. # Dither Bar Chart Dithered grouped, stacked, and percent bar charts with terminal-native textures and interaction Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/dither-bar-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Bar, BarChart, Grid, Legend, Tooltip, XAxis, YAxis, } from "@/components/ui/dither-bar-chart"; import type { ChartConfig } from "@/components/ui/dither-bar-chart"; ``` ```tsx const data = [ { month: "Jan", direct: 34, search: 18 }, { month: "Feb", direct: 47, search: 24 }, { month: "Mar", direct: 42, search: 29 }, ]; const config = { direct: { color: "green", label: "Direct" }, search: { color: "purple", label: "Search" }, } satisfies ChartConfig; ; ``` Examples [#examples] Bar textures [#bar-textures] Set `variant` on a `Bar` to render gradient, dotted, hatched, or solid cells. Stacking modes [#stacking-modes] Switch between cumulative stacks and normalized percent stacks with `stackType`. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | ----------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `stackType` | `"default" \| "stacked" \| "percent"` | `"default"` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `interactive` | `boolean` | `true` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Arrow keys or H/J/K/L navigate chart state; Enter selects clickable series and Escape clears the active point. # Dither Line Chart Dithered multi-series line charts with solid or dashed strokes, markers, axes, and terminal interaction Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/dither-line-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ActiveDot, Dot, Grid, Line, LineChart, Tooltip, XAxis, YAxis, } from "@/components/ui/dither-line-chart"; import type { ChartConfig } from "@/components/ui/dither-line-chart"; ``` ```tsx const data = [ { month: "Jan", latency: 24 }, { month: "Feb", latency: 31 }, { month: "Mar", latency: 27 }, ]; const config = { latency: { color: "purple", label: "Latency" }, } satisfies ChartConfig; ; ``` Examples [#examples] Stroke and marker variants [#stroke-and-marker-variants] Use `strokeVariant` for solid or dashed lines. `Dot` and `ActiveDot` control regular and inspected markers independently. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | -------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `markerIndex` | `number \| null` | `null` | | `interactive` | `boolean` | `true` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Keyboard controls match the area chart: arrows or H/J/K/L navigate, Enter selects a series, Escape clears, and R replays enabled motion. # Dither Pie Chart Dithered pie and donut charts with textured slices, legends, tooltips, and keyboard inspection Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/dither-pie-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Legend, Pie, PieChart, Tooltip, } from "@/components/ui/dither-pie-chart"; import type { ChartConfig } from "@/components/ui/dither-pie-chart"; ``` ```tsx const data = [ { channel: "direct", value: 42 }, { channel: "search", value: 31 }, { channel: "social", value: 17 }, ]; const config = { direct: { color: "blue", label: "Direct" }, search: { color: "green", label: "Search" }, social: { color: "pink", label: "Social" }, } satisfies ChartConfig; ; ``` Examples [#examples] Textures and donut shapes [#textures-and-donut-shapes] All four fill variants work for pies and donuts. Set `innerRadius` between `0` and `0.92` to open the center. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------- | -------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `dataKey` | `string` | required | | `nameKey` | `string` | required | | `innerRadius` | `number` from `0` to `0.92` | `0` | | `width` | `number` | `56` | | `height` | `number` | `12` | | `markerIndex` | `number \| null` | `null` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | Use left/right to inspect slices and up/down to focus legend entries. # Dither Radar Chart Dithered radar charts for comparing multiple series across terminal-friendly radial axes Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/dither-radar-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Legend, Radar, RadarChart, Tooltip, } from "@/components/ui/dither-radar-chart"; import type { ChartConfig } from "@/components/ui/dither-radar-chart"; ``` ```tsx const data = [ { metric: "Speed", desktop: 82, mobile: 68 }, { metric: "Quality", desktop: 74, mobile: 79 }, { metric: "Reach", desktop: 66, mobile: 88 }, { metric: "Trust", desktop: 91, mobile: 72 }, ]; const config = { desktop: { color: "blue", label: "Desktop" }, mobile: { color: "pink", label: "Mobile" }, } satisfies ChartConfig; ; ``` Examples [#examples] Fill variants [#fill-variants] Choose gradient, dotted, hatched, or solid polygon fills independently for each radar series. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | -------- | | `data` | `TData[]` | required | | `config` | `ChartConfig` | required | | `nameKey` | `string` | required | | `width` | `number` | `56` | | `height` | `number` | `12` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `markerIndex` | `number \| null` | `null` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | The standard chart keyboard controls inspect axes, focus series, and replay enabled entrance motion. # Dither Sparkline Compact dithered sparklines for terminal dashboards, summaries, and inline metrics Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/dither-sparkline ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Sparkline } from "@/components/ui/dither-sparkline"; ``` ```tsx ``` Examples [#examples] Fill and marker variants [#fill-and-marker-variants] Sparklines support every dither fill. Add `markerIndex` to highlight a specific sample without enabling interaction. API Reference [#api-reference] | Prop | Type | Default | | ------------------ | --------------------------------------------------- | ------------ | | `data` | `number[]` | required | | `color` | `string` | required | | `width` | `number` | `24` | | `height` | `number` | `4` | | `variant` | `"gradient" \| "dotted" \| "hatched" \| "solid"` | `"gradient"` | | `markerIndex` | `number \| null` | `null` | | `animate` | `boolean` | `false` | | `bloom` | `"off" \| "low" \| "high" \| "aura" \| BloomConfig` | `"off"` | | `noColor` | `boolean` | `false` | | `screenReaderMode` | `boolean` | `false` | # Gauge Arc/speedometer gauge meter Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/gauge ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Gauge } from "@/components/ui/gauge"; ``` ```tsx ``` API Reference [#api-reference] Gauge [#gauge] | Prop | Type | Default | | ------- | ---------------------- | ---------- | | `value` | `number` | `required` | | `min` | `number` | `0` | | `max` | `number` | `100` | | `label` | `string` | - | | `color` | `string` | - | | `size` | `"sm" \| "md" \| "lg"` | `"md"` | # Heat Map Grid heatmap with color intensity scale Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/heat-map ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { HeatMap } from "@/components/ui/heat-map"; ``` ```tsx ``` API Reference [#api-reference] HeatMap [#heatmap] | Prop | Type | Default | | ------------ | ------------ | --------------------- | | `data` | `number[][]` | `required` | | `rowLabels` | `string[]` | - | | `colLabels` | `string[]` | - | | `colorScale` | `string[]` | `DEFAULT_COLOR_SCALE` | | `cellWidth` | `number` | `5` | | `showValues` | `boolean` | `false` | # Charts Components for rendering charts and data visualizations in the terminal. Basic [#basic] Dither [#dither] # Line Chart ASCII line chart with axes and multi-series support Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/line-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { LineChart } from "@/components/ui/line-chart"; ``` ```tsx ``` API Reference [#api-reference] LineChart [#linechart] | Prop | Type | Default | | ---------- | ------------------------------------------------- | ---------- | | `data` | `(number \| { label?: string; value: number })[]` | `required` | | `width` | `number` | `40` | | `height` | `number` | `10` | | `title` | `string` | - | | `color` | `string` | - | | `showAxes` | `boolean` | `true` | # Pie Chart Unicode block pie chart with legend Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/pie-chart ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { PieChart } from "@/components/ui/pie-chart"; ``` ```tsx ``` API Reference [#api-reference] PieChart [#piechart] | Prop | Type | Default | | ----------------- | ---------------- | ---------- | | `data` | `PieChartItem[]` | `required` | | `radius` | `number` | `5` | | `showLegend` | `boolean` | `true` | | `showPercentages` | `boolean` | `true` | # Sparkline Inline Unicode braille sparkline chart Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/sparkline ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Sparkline } from "@/components/ui/sparkline"; ``` ```tsx ``` API Reference [#api-reference] Sparkline [#sparkline] | Prop | Type | Default | | ------- | ---------- | ---------- | | `data` | `number[]` | `required` | | `width` | `number` | `20` | | `color` | `string` | - | | `label` | `string` | - | # Ink React-powered terminal components rendered with Ink. Layout [#layout] Typography [#typography] Input [#input] Selection [#selection] Data [#data] Feedback [#feedback] Navigation [#navigation] Overlays [#overlays] Forms [#forms] Utility [#utility] AI [#ai] # OpenTUI OpenTUI React components for building terminal user interfaces. Layout [#layout] Typography [#typography] Input [#input] Selection [#selection] Data [#data] Feedback [#feedback] Navigation [#navigation] Overlays [#overlays] Forms [#forms] Utility [#utility] AI [#ai] # App Shell Full-screen TUI layout with header, tip bar, full-width input, scrollable content, and hints footer Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/app-shell ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { AppShell } from "@/components/ui/app-shell"; ``` ```tsx Press Tab to move between the command input and output console.log(value)} /> ``` API Reference [#api-reference] AppShell [#appshell] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `children` | `ReactNode` | `required` | | `fullscreen` | `boolean` | - | AppShell.Header [#appshellheader] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | AppShell.Tip [#appshelltip] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | AppShell.Input [#appshellinput] | Prop | Type | Default | | --------------- | ------------------------------------------- | --------------------- | | `value` | `string` | - | | `defaultValue` | `string` | `""` | | `onValueChange` | `(value: string) => void` | - | | `onChange` | `(value: string) => void` | - | | `onSubmit` | `(value: string) => void` | - | | `placeholder` | `string` | `"Type something..."` | | `borderStyle` | `"single" \| "double" \| "round" \| "bold"` | `"single"` | | `borderColor` | `string` | - | | `prefix` | `string` | `">"` | | `readOnly` | `boolean` | `false` | | `required` | `boolean` | `false` | | `cursorOrigin` | `{x: number; y: number}` | - | | `id` | `string` | generated | | `autoFocus` | `boolean` | `false` | | `isActive` | `boolean` | `true` | | `disabled` | `boolean` | `false` | AppShell.Content [#appshellcontent] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `children` | `ReactNode` | `required` | | `autoscroll` | `boolean` | - | | `height` | `number` | `20` | AppShell.Hints [#appshellhints] | Prop | Type | Default | | ---------- | ----------- | ------- | | `items` | `string[]` | - | | `children` | `ReactNode` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Left` / `Right` move by grapheme, `Home` / `End` move to the boundaries, and `Backspace` / `Delete` remove one complete grapheme. `Enter` submits or confirms (`Ctrl+Enter` in TextArea); `Tab` / `Shift+Tab` leave through Ink focus traversal. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Bullet List Nested structured content with ●/└/□ bullet prefixes Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/bullet-list ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { BulletList } from "@/components/ui/bullet-list"; ``` ```tsx ``` API Reference [#api-reference] BulletList [#bulletlist] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | BulletList.Item [#bulletlistitem] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `label` | `string` | `required` | | `bold` | `boolean` | `false` | | `color` | `string` | - | | `children` | `ReactNode` | - | BulletList.Sub [#bulletlistsub] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | BulletList.TreeItem [#bulletlisttreeitem] | Prop | Type | Default | | ------- | -------- | ---------- | | `label` | `string` | `required` | | `color` | `string` | - | BulletList.CheckItem [#bulletlistcheckitem] | Prop | Type | Default | | ------- | --------- | ---------- | | `label` | `string` | `required` | | `done` | `boolean` | `false` | | `color` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Help Screen Figlet banner + tagline + aligned Options/Commands help sections Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/help-screen ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { HelpScreen } from "@/components/ui/help-screen"; ``` ```tsx ``` API Reference [#api-reference] HelpScreen [#helpscreen] | Prop | Type | Default | | ------------- | ------------------------------------------ | ---------- | | `title` | `string` | `required` | | `font` | `"block" \| "simple" \| "shade" \| "slim"` | `"block"` | | `titleColor` | `string` | - | | `tagline` | `string` | - | | `usage` | `string` | - | | `description` | `string` | - | | `columnGap` | `number` | `4` | | `flagWidth` | `number` | - | | `children` | `ReactNode` | `required` | HelpScreen.Section [#helpscreensection] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `label` | `string` | `required` | | `labelColor` | `string` | - | | `children` | `ReactNode` | `required` | HelpScreen.Row [#helpscreenrow] | Prop | Type | Default | | ------------------ | -------- | ---------- | | `flag` | `string` | `required` | | `description` | `string` | `required` | | `flagColor` | `string` | - | | `descriptionColor` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Ink Templates Pre-built terminal UI templates for Ink framework. # Info Box Bordered info panel with header, key-value rows, and tree-prefix rows Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/info-box ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { InfoBox } from "@/components/ui/info-box"; ``` ```tsx ``` API Reference [#api-reference] InfoBox [#infobox] | Prop | Type | Default | | ------------- | ------------------------------------------- | ---------- | | `borderStyle` | `"single" \| "round" \| "double" \| "bold"` | `"single"` | | `borderColor` | `string` | - | | `padding` | `[number, number]` | `[0, 1]` | | `width` | `number \| "full"` | - | | `children` | `ReactNode` | `required` | InfoBox.Header [#infoboxheader] | Prop | Type | Default | | -------------- | -------- | ---------- | | `icon` | `string` | - | | `iconColor` | `string` | `"green"` | | `label` | `string` | `required` | | `description` | `string` | - | | `version` | `string` | - | | `versionColor` | `string` | `"cyan"` | InfoBox.Row [#infoboxrow] | Prop | Type | Default | | ------------- | --------- | ---------- | | `label` | `string` | `required` | | `value` | `string` | - | | `valueDetail` | `string` | - | | `valueColor` | `string` | - | | `bold` | `boolean` | `false` | | `tree` | `boolean` | `false` | | `color` | `string` | - | InfoBox.TreeRow [#infoboxtreerow] Same props as `InfoBox.Row` except `tree` is always `true`. Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Login Flow Full-page onboarding/login screen with announcement banner, big ASCII title, description, and numbered select Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/login-flow ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { LoginFlow } from "@/components/ui/login-flow"; ``` ```tsx Version 3.0 is now available! Sign in to access your workspace. console.log("selected", index)} /> ``` API Reference [#api-reference] LoginFlow [#loginflow] | Prop | Type | Default | | ------------ | ------------------------------------------ | ---------- | | `title` | `string` | - | | `titleFont` | `"block" \| "simple" \| "shade" \| "slim"` | `"block"` | | `titleColor` | `string` | - | | `padding` | `number` | `2` | | `onSelect` | `(index: number) => void` | - | | `children` | `ReactNode` | `required` | LoginFlow.Announcement [#loginflowannouncement] | Prop | Type | Default | | ------------- | ------------------------------------------- | ---------- | | `icon` | `string` | `"*"` | | `iconColor` | `string` | - | | `borderStyle` | `"single" \| "round" \| "double" \| "bold"` | `"single"` | | `borderColor` | `string` | - | | `children` | `ReactNode` | `required` | LoginFlow.Description [#loginflowdescription] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `bold` | `boolean` | `false` | | `dim` | `boolean` | `false` | | `color` | `string` | - | | `children` | `ReactNode` | `required` | LoginFlow.Select [#loginflowselect] | Prop | Type | Default | | -------------- | ------------------------- | ---------- | | `label` | `string` | - | | `labelBold` | `boolean` | `false` | | `options` | `string[]` | `required` | | `activeIndex` | `number` | - | | `defaultIndex` | `number` | `0` | | `cursor` | `string` | `"›"` | | `cursorColor` | `string` | `"cyan"` | | `activeColor` | `string` | `"cyan"` | | `onSelect` | `(index: number) => void` | `required` | | `keyboardNav` | `boolean` | `true` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Setup Flow @clack-style step flow with ◇/◆/│ visual language, badge, info steps, and multi-select Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/setup-flow ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { SetupFlow } from "@/components/ui/setup-flow"; ``` ```tsx Project name set to my-app Template selected: React Installing dependencies... console.log(values)} /> ``` API Reference [#api-reference] SetupFlow [#setupflow] | Prop | Type | Default | | ---------------- | ------------------------------------------ | ----------- | | `title` | `string` | - | | `titleFont` | `"block" \| "simple" \| "shade" \| "slim"` | `"block"` | | `titleColor` | `string` | `"#888888"` | | `titleColorAlt` | `string` | - | | `connectorChar` | `string` | `"│"` | | `connectorColor` | `string` | - | | `children` | `ReactNode` | `required` | SetupFlow.Badge [#setupflowbadge] | Prop | Type | Default | | ------- | -------- | ---------- | | `label` | `string` | `required` | | `bg` | `string` | `"cyan"` | | `color` | `string` | `"black"` | SetupFlow.Step [#setupflowstep] | Prop | Type | Default | | ----------- | --------------------------------------------------------- | ---------- | | `icon` | `string` | - | | `iconColor` | `string` | - | | `status` | `"done" \| "active" \| "pending" \| "success" \| "error"` | `"done"` | | `children` | `ReactNode` | `required` | SetupFlow.Spinner [#setupflowspinner] | Prop | Type | Default | | ------------ | ------------ | ---------- | | `label` | `string` | `required` | | `onComplete` | `() => void` | - | SetupFlow.MultiSelect [#setupflowmultiselect] | Prop | Type | Default | | --------------- | ---------------------------------------------------------- | ---------- | | `label` | `string` | `required` | | `hint` | `string` | - | | `options` | `{ value: string; label: string; description?: string }[]` | `required` | | `values` | `string[]` | - | | `onChange` | `(values: string[]) => void` | - | | `onSubmit` | `(values: string[]) => void` | - | | `checkedChar` | `string` | `"■"` | | `uncheckedChar` | `string` | `"□"` | | `checkedColor` | `string` | `"green"` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Splash Screen Styled startup banner with big ASCII art title, subtitle, author credit, and status line Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/splash-screen ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { SplashScreen } from "@/components/ui/splash-screen"; ``` ```tsx ● Ready on port 3000} /> ``` API Reference [#api-reference] SplashScreen [#splashscreen] | Prop | Type | Default | | --------------- | --------------------------------- | ---------- | | `title` | `string` | `required` | | `font` | `"block" \| "simple"` | `"block"` | | `titleColor` | `string` | - | | `titleColorAlt` | `string` | - | | `bold` | `boolean` | `true` | | `subtitle` | `string` | - | | `subtitleDim` | `boolean` | `true` | | `author` | `{ name: string; href?: string }` | - | | `statusLine` | `ReactNode` | - | | `padding` | `number` | `2` | | `align` | `"left" \| "center"` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Usage Monitor Real-time dashboard with diamond header, progress metrics, burn rate, predictions, and status bar Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/usage-monitor ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { UsageMonitor } from "@/components/ui/usage-monitor"; ``` ```tsx ``` API Reference [#api-reference] UsageMonitor [#usagemonitor] | Prop | Type | Default | | ----------------- | ----------- | ---------- | | `refreshInterval` | `number` | `1000` | | `separatorChar` | `string` | `"─"` | | `children` | `ReactNode` | `required` | UsageMonitor.Header [#usagemonitorheader] | Prop | Type | Default | | ---------------- | -------- | ----------- | | `title` | `string` | `required` | | `titleColor` | `string` | `"cyan"` | | `decorator` | `string` | `"◆ ✦ ◆ ✦"` | | `separatorChar` | `string` | `"═"` | | `separatorColor` | `string` | - | UsageMonitor.Tags [#usagemonitortags] | Prop | Type | Default | | ---------------- | ---------- | ---------- | | `items` | `string[]` | `required` | | `bracketColor` | `string` | `"cyan"` | | `separatorColor` | `string` | `"cyan"` | UsageMonitor.Section [#usagemonitorsection] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `icon` | `string` | - | | `title` | `string` | - | | `subtitle` | `string` | - | | `children` | `ReactNode` | `required` | UsageMonitor.Metric [#usagemonitormetric] | Prop | Type | Default | | -------------- | --------------------------------------------------------------- | ---------- | | `icon` | `string` | - | | `label` | `string` | `required` | | `value` | `number` | `required` | | `max` | `number` | `required` | | `percent` | `number` | `required` | | `status` | `"green" \| "yellow" \| "red" \| "blue"` | `required` | | `format` | `"number" \| "currency" \| "duration" \| "percent" \| "custom"` | `required` | | `formatFn` | `(v: number, max: number) => string` | - | | `barWidth` | `number` | `22` | | `barFillChar` | `string` | `"█"` | | `barEmptyChar` | `string` | `"░"` | | `barColor` | `string` | `"white"` | | `maxDim` | `boolean` | `false` | | `showMax` | `boolean` | `true` | UsageMonitor.DistributionMetric [#usagemonitordistributionmetric] | Prop | Type | Default | | ---------- | ------------------------------------------------------ | ---------- | | `icon` | `string` | - | | `label` | `string` | `required` | | `segments` | `{ label: string; percent: number; color?: string }[]` | `required` | | `barWidth` | `number` | `22` | UsageMonitor.Stats [#usagemonitorstats] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | UsageMonitor.StatRow [#usagemonitorstatrow] | Prop | Type | Default | | ------------- | -------- | ---------- | | `icon` | `string` | - | | `label` | `string` | `required` | | `value` | `string` | `required` | | `valueSuffix` | `string` | - | | `valueColor` | `string` | `"white"` | UsageMonitor.Predictions [#usagemonitorpredictions] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | UsageMonitor.Prediction [#usagemonitorprediction] | Prop | Type | Default | | ------------ | -------- | ---------- | | `label` | `string` | `required` | | `value` | `string` | `required` | | `valueColor` | `string` | `"yellow"` | UsageMonitor.StatusBar [#usagemonitorstatusbar] | Prop | Type | Default | | -------------- | ------------------------------ | --------- | | `clock` | `boolean` | `false` | | `clockColor` | `string` | `"cyan"` | | `sessionLabel` | `string` | - | | `sessionColor` | `string` | `"green"` | | `exitHint` | `string` | - | | `statusDot` | `"green" \| "yellow" \| "red"` | `"green"` | | `separator` | `string` | `" \| "` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Welcome Screen Two-panel welcome dashboard with titled border, logo, greeting, and sections Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/welcome-screen ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { WelcomeScreen } from "@/components/ui/welcome-screen"; ``` ```tsx {" ╔══╗\n ║DT║\n ╚══╝"} Welcome back, developer! Run `devtool init` to scaffold a new project. my-app, api-server, dashboard ``` API Reference [#api-reference] WelcomeScreen [#welcomescreen] | Prop | Type | Default | | -------------- | ------------------------------------------- | ---------- | | `appName` | `string` | `required` | | `appNameColor` | `string` | - | | `version` | `string` | - | | `borderColor` | `string` | - | | `borderStyle` | `"single" \| "round" \| "double" \| "bold"` | `"single"` | | `leftWidth` | `number` | `26` | | `children` | `ReactNode` | `required` | WelcomeScreen.Left [#welcomescreenleft] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | WelcomeScreen.Right [#welcomescreenright] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | WelcomeScreen.Greeting [#welcomescreengreeting] | Prop | Type | Default | | ---------- | -------------------- | ---------- | | `children` | `ReactNode` | `required` | | `bold` | `boolean` | `true` | | `align` | `"left" \| "center"` | `"left"` | | `color` | `string` | - | WelcomeScreen.Logo [#welcomescreenlogo] | Prop | Type | Default | | ---------- | -------------------- | ---------- | | `children` | `ReactNode` | `required` | | `align` | `"left" \| "center"` | `"left"` | WelcomeScreen.Meta [#welcomescreenmeta] | Prop | Type | Default | | ----------- | -------------------- | ---------- | | `items` | `string[]` | `required` | | `separator` | `string` | `" · "` | | `align` | `"left" \| "center"` | `"center"` | | `dim` | `boolean` | `false` | | `color` | `string` | - | | `stack` | `boolean` | `false` | WelcomeScreen.Section [#welcomescreensection] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `title` | `string` | `required` | | `titleColor` | `string` | - | | `titleBold` | `boolean` | `true` | | `children` | `ReactNode` | `required` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # App Shell Full-screen TUI layout with header, tip bar, full-width input, scrollable content, and hints footer Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/app-shell ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { AppShell } from "@/components/ui/app-shell"; ``` ```tsx Press Tab to autocomplete commands console.log(value)} /> ``` API Reference [#api-reference] AppShell [#appshell] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `children` | `ReactNode` | `required` | | `fullscreen` | `boolean` | - | AppShell.Header [#appshellheader] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | AppShell.Tip [#appshelltip] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | AppShell.Input [#appshellinput] | Prop | Type | Default | | ------------- | ------------------------------------------- | --------------------- | | `value` | `string` | - | | `onChange` | `(value: string) => void` | - | | `onSubmit` | `(value: string) => void` | - | | `placeholder` | `string` | `"Type something..."` | | `borderStyle` | `"single" \| "double" \| "round" \| "bold"` | `"single"` | | `borderColor` | `string` | - | | `prefix` | `string` | `">"` | AppShell.Content [#appshellcontent] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `children` | `ReactNode` | `required` | | `autoscroll` | `boolean` | - | | `height` | `number` | `20` | AppShell.Hints [#appshellhints] | Prop | Type | Default | | ---------- | ----------- | ------- | | `items` | `string[]` | - | | `children` | `ReactNode` | - | # Bullet List Nested structured content with ●/└/□ bullet prefixes Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/bullet-list ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { BulletList } from "@/components/ui/bullet-list"; ``` ```tsx ``` API Reference [#api-reference] BulletList [#bulletlist] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | BulletList.Item [#bulletlistitem] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `label` | `string` | `required` | | `bold` | `boolean` | `false` | | `color` | `string` | - | | `children` | `ReactNode` | - | BulletList.Sub [#bulletlistsub] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | BulletList.TreeItem [#bulletlisttreeitem] | Prop | Type | Default | | ------- | -------- | ---------- | | `label` | `string` | `required` | | `color` | `string` | - | BulletList.CheckItem [#bulletlistcheckitem] | Prop | Type | Default | | ------- | --------- | ---------- | | `label` | `string` | `required` | | `done` | `boolean` | `false` | | `color` | `string` | - | # Help Screen Figlet banner + tagline + aligned Options/Commands help sections Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/help-screen ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { HelpScreen } from "@/components/ui/help-screen"; ``` ```tsx ``` API Reference [#api-reference] HelpScreen [#helpscreen] | Prop | Type | Default | | ------------- | ------------------------------------------ | ---------- | | `title` | `string` | `required` | | `font` | `"block" \| "simple" \| "shade" \| "slim"` | `"block"` | | `titleColor` | `string` | - | | `tagline` | `string` | - | | `usage` | `string` | - | | `description` | `string` | - | | `columnGap` | `number` | `4` | | `flagWidth` | `number` | - | | `children` | `ReactNode` | `required` | HelpScreen.Section [#helpscreensection] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `label` | `string` | `required` | | `labelColor` | `string` | - | | `children` | `ReactNode` | `required` | HelpScreen.Row [#helpscreenrow] | Prop | Type | Default | | ------------------ | -------- | ---------- | | `flag` | `string` | `required` | | `description` | `string` | `required` | | `flagColor` | `string` | - | | `descriptionColor` | `string` | - | # OpenTUI Templates Pre-built terminal UI templates for OpenTUI framework. # Info Box Bordered info panel with header, key-value rows, and tree-prefix rows Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/info-box ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { InfoBox } from "@/components/ui/info-box"; ``` ```tsx ``` API Reference [#api-reference] InfoBox [#infobox] | Prop | Type | Default | | ------------- | ------------------------------------------- | ---------- | | `borderStyle` | `"single" \| "round" \| "double" \| "bold"` | `"single"` | | `borderColor` | `string` | - | | `padding` | `[number, number]` | `[0, 1]` | | `width` | `number \| "full"` | - | | `children` | `ReactNode` | `required` | InfoBox.Header [#infoboxheader] | Prop | Type | Default | | -------------- | -------- | ---------- | | `icon` | `string` | - | | `iconColor` | `string` | `"green"` | | `label` | `string` | `required` | | `description` | `string` | - | | `version` | `string` | - | | `versionColor` | `string` | `"cyan"` | InfoBox.Row [#infoboxrow] | Prop | Type | Default | | ------------- | --------- | ---------- | | `label` | `string` | `required` | | `value` | `string` | - | | `valueDetail` | `string` | - | | `valueColor` | `string` | - | | `bold` | `boolean` | `false` | | `tree` | `boolean` | `false` | | `color` | `string` | - | InfoBox.TreeRow [#infoboxtreerow] Same props as `InfoBox.Row` except `tree` is always `true`. # Login Flow Full-page onboarding/login screen with announcement banner, big ASCII title, description, and numbered select Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/login-flow ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { LoginFlow } from "@/components/ui/login-flow"; ``` ```tsx Version 3.0 is now available! Sign in to access your workspace. console.log("selected", index)} /> ``` API Reference [#api-reference] LoginFlow [#loginflow] | Prop | Type | Default | | ------------ | ------------------------------------------ | ---------- | | `title` | `string` | - | | `titleFont` | `"block" \| "simple" \| "shade" \| "slim"` | `"block"` | | `titleColor` | `string` | - | | `padding` | `number` | `2` | | `onSelect` | `(index: number) => void` | - | | `children` | `ReactNode` | `required` | LoginFlow.Announcement [#loginflowannouncement] | Prop | Type | Default | | ------------- | ------------------------------------------- | ---------- | | `icon` | `string` | `"*"` | | `iconColor` | `string` | - | | `borderStyle` | `"single" \| "round" \| "double" \| "bold"` | `"single"` | | `borderColor` | `string` | - | | `children` | `ReactNode` | `required` | LoginFlow.Description [#loginflowdescription] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `bold` | `boolean` | `false` | | `dim` | `boolean` | `false` | | `color` | `string` | - | | `children` | `ReactNode` | `required` | LoginFlow.Select [#loginflowselect] | Prop | Type | Default | | -------------- | ------------------------- | ---------- | | `label` | `string` | - | | `labelBold` | `boolean` | `false` | | `options` | `string[]` | `required` | | `activeIndex` | `number` | - | | `defaultIndex` | `number` | `0` | | `cursor` | `string` | `"›"` | | `cursorColor` | `string` | `"cyan"` | | `activeColor` | `string` | `"cyan"` | | `onSelect` | `(index: number) => void` | `required` | | `keyboardNav` | `boolean` | `true` | # Setup Flow @clack-style step flow with ◇/◆/│ visual language, badge, info steps, and multi-select Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/setup-flow ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { SetupFlow } from "@/components/ui/setup-flow"; ``` ```tsx Project name set to my-app Template selected: React Installing dependencies... console.log(values)} /> ``` API Reference [#api-reference] SetupFlow [#setupflow] | Prop | Type | Default | | ---------------- | ------------------------------------------ | ----------- | | `title` | `string` | - | | `titleFont` | `"block" \| "simple" \| "shade" \| "slim"` | `"block"` | | `titleColor` | `string` | `"#888888"` | | `titleColorAlt` | `string` | - | | `connectorChar` | `string` | `"│"` | | `connectorColor` | `string` | - | | `children` | `ReactNode` | `required` | SetupFlow.Badge [#setupflowbadge] | Prop | Type | Default | | ------- | -------- | ---------- | | `label` | `string` | `required` | | `bg` | `string` | `"cyan"` | | `color` | `string` | `"black"` | SetupFlow.Step [#setupflowstep] | Prop | Type | Default | | ----------- | --------------------------------------------------------- | ---------- | | `icon` | `string` | - | | `iconColor` | `string` | - | | `status` | `"done" \| "active" \| "pending" \| "success" \| "error"` | `"done"` | | `children` | `ReactNode` | `required` | SetupFlow.Spinner [#setupflowspinner] | Prop | Type | Default | | ------------ | ------------ | ---------- | | `label` | `string` | `required` | | `onComplete` | `() => void` | - | SetupFlow.MultiSelect [#setupflowmultiselect] | Prop | Type | Default | | --------------- | ---------------------------------------------------------- | ---------- | | `label` | `string` | `required` | | `hint` | `string` | - | | `options` | `{ value: string; label: string; description?: string }[]` | `required` | | `values` | `string[]` | - | | `onChange` | `(values: string[]) => void` | - | | `onSubmit` | `(values: string[]) => void` | - | | `checkedChar` | `string` | `"■"` | | `uncheckedChar` | `string` | `"□"` | | `checkedColor` | `string` | `"green"` | # Splash Screen Styled startup banner with big ASCII art title, subtitle, author credit, and status line Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/splash-screen ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { SplashScreen } from "@/components/ui/splash-screen"; ``` ```tsx ● Ready on port 3000} /> ``` API Reference [#api-reference] SplashScreen [#splashscreen] | Prop | Type | Default | | --------------- | --------------------------------- | ---------- | | `title` | `string` | `required` | | `font` | `"block" \| "simple"` | `"block"` | | `titleColor` | `string` | - | | `titleColorAlt` | `string` | - | | `bold` | `boolean` | `true` | | `subtitle` | `string` | - | | `subtitleDim` | `boolean` | `true` | | `author` | `{ name: string; href?: string }` | - | | `statusLine` | `ReactNode` | - | | `padding` | `number` | `2` | | `align` | `"left" \| "center"` | - | # Usage Monitor Real-time dashboard with diamond header, progress metrics, burn rate, predictions, and status bar Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/usage-monitor ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { UsageMonitor } from "@/components/ui/usage-monitor"; ``` ```tsx ``` API Reference [#api-reference] UsageMonitor [#usagemonitor] | Prop | Type | Default | | ----------------- | ----------- | ---------- | | `refreshInterval` | `number` | `1000` | | `separatorChar` | `string` | `"─"` | | `children` | `ReactNode` | `required` | UsageMonitor.Header [#usagemonitorheader] | Prop | Type | Default | | ---------------- | -------- | ----------- | | `title` | `string` | `required` | | `titleColor` | `string` | `"cyan"` | | `decorator` | `string` | `"◆ ✦ ◆ ✦"` | | `separatorChar` | `string` | `"═"` | | `separatorColor` | `string` | - | UsageMonitor.Tags [#usagemonitortags] | Prop | Type | Default | | ---------------- | ---------- | ---------- | | `items` | `string[]` | `required` | | `bracketColor` | `string` | `"cyan"` | | `separatorColor` | `string` | `"cyan"` | UsageMonitor.Section [#usagemonitorsection] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `icon` | `string` | - | | `title` | `string` | - | | `subtitle` | `string` | - | | `children` | `ReactNode` | `required` | UsageMonitor.Metric [#usagemonitormetric] | Prop | Type | Default | | -------------- | --------------------------------------------------------------- | ---------- | | `icon` | `string` | - | | `label` | `string` | `required` | | `value` | `number` | `required` | | `max` | `number` | `required` | | `percent` | `number` | `required` | | `status` | `"green" \| "yellow" \| "red" \| "blue"` | `required` | | `format` | `"number" \| "currency" \| "duration" \| "percent" \| "custom"` | `required` | | `formatFn` | `(v: number, max: number) => string` | - | | `barWidth` | `number` | `22` | | `barFillChar` | `string` | `"█"` | | `barEmptyChar` | `string` | `"░"` | | `barColor` | `string` | `"white"` | | `maxDim` | `boolean` | `false` | | `showMax` | `boolean` | `true` | UsageMonitor.DistributionMetric [#usagemonitordistributionmetric] | Prop | Type | Default | | ---------- | ------------------------------------------------------ | ---------- | | `icon` | `string` | - | | `label` | `string` | `required` | | `segments` | `{ label: string; percent: number; color?: string }[]` | `required` | | `barWidth` | `number` | `22` | UsageMonitor.Stats [#usagemonitorstats] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | UsageMonitor.StatRow [#usagemonitorstatrow] | Prop | Type | Default | | ------------- | -------- | ---------- | | `icon` | `string` | - | | `label` | `string` | `required` | | `value` | `string` | `required` | | `valueSuffix` | `string` | - | | `valueColor` | `string` | `"white"` | UsageMonitor.Predictions [#usagemonitorpredictions] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | UsageMonitor.Prediction [#usagemonitorprediction] | Prop | Type | Default | | ------------ | -------- | ---------- | | `label` | `string` | `required` | | `value` | `string` | `required` | | `valueColor` | `string` | `"yellow"` | UsageMonitor.StatusBar [#usagemonitorstatusbar] | Prop | Type | Default | | -------------- | ------------------------------ | --------- | | `clock` | `boolean` | `false` | | `clockColor` | `string` | `"cyan"` | | `sessionLabel` | `string` | - | | `sessionColor` | `string` | `"green"` | | `exitHint` | `string` | - | | `statusDot` | `"green" \| "yellow" \| "red"` | `"green"` | | `separator` | `string` | `" \| "` | # Welcome Screen Two-panel welcome dashboard with titled border, logo, greeting, and sections Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/welcome-screen ``` Install the following dependencies: ```bash npm install @opentui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { WelcomeScreen } from "@/components/ui/welcome-screen"; ``` ```tsx {" ╔══╗\n ║DT║\n ╚══╝"} Welcome back, developer! Run `devtool init` to scaffold a new project. my-app, api-server, dashboard ``` API Reference [#api-reference] WelcomeScreen [#welcomescreen] | Prop | Type | Default | | -------------- | ------------------------------------------- | ---------- | | `appName` | `string` | `required` | | `appNameColor` | `string` | - | | `version` | `string` | - | | `borderColor` | `string` | - | | `borderStyle` | `"single" \| "round" \| "double" \| "bold"` | `"single"` | | `leftWidth` | `number` | `26` | | `children` | `ReactNode` | `required` | WelcomeScreen.Left [#welcomescreenleft] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | WelcomeScreen.Right [#welcomescreenright] | Prop | Type | Default | | ---------- | ----------- | ---------- | | `children` | `ReactNode` | `required` | WelcomeScreen.Greeting [#welcomescreengreeting] | Prop | Type | Default | | ---------- | -------------------- | ---------- | | `children` | `ReactNode` | `required` | | `bold` | `boolean` | `true` | | `align` | `"left" \| "center"` | `"left"` | | `color` | `string` | - | WelcomeScreen.Logo [#welcomescreenlogo] | Prop | Type | Default | | ---------- | -------------------- | ---------- | | `children` | `ReactNode` | `required` | | `align` | `"left" \| "center"` | `"left"` | WelcomeScreen.Meta [#welcomescreenmeta] | Prop | Type | Default | | ----------- | -------------------- | ---------- | | `items` | `string[]` | `required` | | `separator` | `string` | `" · "` | | `align` | `"left" \| "center"` | `"center"` | | `dim` | `boolean` | `false` | | `color` | `string` | - | | `stack` | `boolean` | `false` | WelcomeScreen.Section [#welcomescreensection] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `title` | `string` | `required` | | `titleColor` | `string` | - | | `titleBold` | `boolean` | `true` | | `children` | `ReactNode` | `required` | # AMOLED High contrast dark theme with AMOLED-style pure black. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-amoled ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { amoledTheme } from "@/lib/terminal-themes/amoled"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"AMOLED"} ); } ``` # Aura Soft, elegant theme with pastel purple tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-aura ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { auraTheme } from "@/lib/terminal-themes/aura"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Aura"} ); } ``` # Ayu Clean, modern theme inspired by Ayu terminal. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-ayu ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { ayuTheme } from "@/lib/terminal-themes/ayu"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Ayu"} ); } ``` # Carbonfox Minimal dark theme with carbon tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-carbonfox ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { carbonfoxTheme } from "@/lib/terminal-themes/carbonfox"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Carbonfox"} ); } ``` # Catppuccin Frappe Catppuccin frappe flavor - soothing pastel palette. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-catppuccin-frappe ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { catppuccinFrappeTheme } from "@/lib/terminal-themes/catppuccin-frappe"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Catppuccin Frappe"} ); } ``` # Catppuccin Macchiato Catppuccin macchiato flavor - deeper pastel tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-catppuccin-macchiato ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { catppuccinMacchiatoTheme } from "@/lib/terminal-themes/catppuccin-macchiato"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Catppuccin Macchiato"} ); } ``` # Catppuccin A Catppuccin theme for rich terminal UI previews. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-catppuccin ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { catppuccinTheme } from "@/lib/terminal-themes/catppuccin"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Catppuccin ); } ``` # Cobalt2 Vibrant blue and gold theme with deep contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-cobalt2 ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { cobalt2Theme } from "@/lib/terminal-themes/cobalt2"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Cobalt2"} ); } ``` # Cursor Cursor IDE theme - clean and modern dark theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-cursor ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { cursorTheme } from "@/lib/terminal-themes/cursor"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Cursor"} ); } ``` # Default The default termcn terminal theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-default ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { defaultTheme } from "@/lib/terminal-themes/default"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Default ); } ``` # Dracula A purple-heavy Dracula theme for terminal UI components. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-dracula ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { draculaTheme } from "@/lib/terminal-themes/dracula"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Dracula ); } ``` # Everforest Warm dark theme with forest green tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-everforest ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { everforestTheme } from "@/lib/terminal-themes/everforest"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Everforest"} ); } ``` # Flexoki Versatile theme with warm colors and good contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-flexoki ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { flexokiTheme } from "@/lib/terminal-themes/flexoki"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Flexoki"} ); } ``` # GitHub GitHub's official dark theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-github ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { githubTheme } from "@/lib/terminal-themes/github"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"GitHub"} ); } ``` # Gruvbox Retro-style theme with warm earth tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-gruvbox ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { gruvboxTheme } from "@/lib/terminal-themes/gruvbox"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Gruvbox"} ); } ``` # High Contrast Light WCAG-friendly light high-contrast theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-high-contrast-light ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { highContrastLightTheme } from "@/lib/terminal-themes/high-contrast"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"High Contrast Light"} ); } ``` # High Contrast High contrast themes for dark and light terminal backgrounds. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-high-contrast ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { highContrastTheme } from "@/lib/terminal-themes/high-contrast"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( High Contrast ); } ``` This file also exports `highContrastLightTheme` for bright terminal backgrounds. # Kanagawa Japanese-inspired theme with wave motifs. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-kanagawa ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { kanagawaTheme } from "@/lib/terminal-themes/kanagawa"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Kanagawa"} ); } ``` # Lucent Orng Warm orange theme with translucent feel. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-lucent-orng ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { lucentOrngTheme } from "@/lib/terminal-themes/lucent-orng"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Lucent Orng"} ); } ``` # Material Material Design color palette theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-material ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { materialTheme } from "@/lib/terminal-themes/material"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Material"} ); } ``` # Matrix Green code rain inspired theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-matrix ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { matrixTheme } from "@/lib/terminal-themes/matrix"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Matrix"} ); } ``` # Mercury Clean and minimal dark theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-mercury ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { mercuryTheme } from "@/lib/terminal-themes/mercury"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Mercury"} ); } ``` # Monokai A classic Monokai-inspired theme for terminal apps. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-monokai ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { monokaiTheme } from "@/lib/terminal-themes/monokai"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Monokai ); } ``` # Night Owl Night owl theme optimized for late-night coding. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-nightowl ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { nightowlTheme } from "@/lib/terminal-themes/nightowl"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Night Owl"} ); } ``` # Nord A cool Nord palette tuned for terminal contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-nord ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { nordTheme } from "@/lib/terminal-themes/nord"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Nord ); } ``` # OC-2 Clean, minimal theme with high contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-oc-2 ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { oc2Theme } from "@/lib/terminal-themes/oc-2"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"OC-2"} ); } ``` # One Dark A One Dark theme for terminal components. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-one-dark ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { oneDarkTheme } from "@/lib/terminal-themes/one-dark"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( One Dark ); } ``` # One Dark Pro One Dark Pro - VS Code theme version. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-onedarkpro ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { onedarkproTheme } from "@/lib/terminal-themes/onedarkpro"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"One Dark Pro"} ); } ``` # OpenCode The official OpenCode theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-opencode ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { opencodeTheme } from "@/lib/terminal-themes/opencode"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"OpenCode"} ); } ``` # Orng Vibrant orange theme with high contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-orng ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { orngTheme } from "@/lib/terminal-themes/orng"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Orng"} ); } ``` # Osaka Jade Japanese-inspired theme with jade green tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-osaka-jade ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { osakaJadeTheme } from "@/lib/terminal-themes/osaka-jade"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Osaka Jade"} ); } ``` # Palenight Purple-tinted dark theme from React Native. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-palenight ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { palenightTheme } from "@/lib/terminal-themes/palenight"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Palenight"} ); } ``` # Rose Pine Dark theme with warm rose tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-rosepine ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { rosepineTheme } from "@/lib/terminal-themes/rosepine"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Rose Pine"} ); } ``` # Shades of Purple Bold purple theme with vibrant accents. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-shadesofpurple ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { shadesofpurpleTheme } from "@/lib/terminal-themes/shadesofpurple"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Shades of Purple"} ); } ``` # Solarized A Solarized theme for terminal components. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-solarized ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { solarizedTheme } from "@/lib/terminal-themes/solarized"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Solarized ); } ``` # Synthwave '84 Retro-futuristic theme with neon colors. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-synthwave84 ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { synthwave84Theme } from "@/lib/terminal-themes/synthwave84"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Synthwave '84"} ); } ``` # Tokyo Night Tokyo Night colors for terminal interfaces. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-tokyo-night ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { tokyoNightTheme } from "@/lib/terminal-themes/tokyo-night"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Tokyo Night ); } ``` # Vercel Vercel's official brand colors. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-vercel ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { vercelTheme } from "@/lib/terminal-themes/vercel"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Vercel"} ); } ``` # Vesper Minimal stark theme with high contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-vesper ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { vesperTheme } from "@/lib/terminal-themes/vesper"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Vesper"} ); } ``` # Zenburn Low-contrast theme for long coding sessions. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/theme-zenburn ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { zenburnTheme } from "@/lib/terminal-themes/zenburn"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Zenburn"} ); } ``` # AMOLED High contrast dark theme with AMOLED-style pure black. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-amoled ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { amoledTheme } from "@/lib/terminal-themes/amoled"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"AMOLED"} ); } ``` # Aura Soft, elegant theme with pastel purple tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-aura ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { auraTheme } from "@/lib/terminal-themes/aura"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Aura"} ); } ``` # Ayu Clean, modern theme inspired by Ayu terminal. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-ayu ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { ayuTheme } from "@/lib/terminal-themes/ayu"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Ayu"} ); } ``` # Carbonfox Minimal dark theme with carbon tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-carbonfox ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { carbonfoxTheme } from "@/lib/terminal-themes/carbonfox"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Carbonfox"} ); } ``` # Catppuccin Frappe Catppuccin frappe flavor - soothing pastel palette. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-catppuccin-frappe ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { catppuccinFrappeTheme } from "@/lib/terminal-themes/catppuccin-frappe"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Catppuccin Frappe"} ); } ``` # Catppuccin Macchiato Catppuccin macchiato flavor - deeper pastel tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-catppuccin-macchiato ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { catppuccinMacchiatoTheme } from "@/lib/terminal-themes/catppuccin-macchiato"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Catppuccin Macchiato"} ); } ``` # Catppuccin A Catppuccin theme for rich terminal UI previews. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-catppuccin ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { catppuccinTheme } from "@/lib/terminal-themes/catppuccin"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Catppuccin ); } ``` # Cobalt2 Vibrant blue and gold theme with deep contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-cobalt2 ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { cobalt2Theme } from "@/lib/terminal-themes/cobalt2"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Cobalt2"} ); } ``` # Cursor Cursor IDE theme - clean and modern dark theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-cursor ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { cursorTheme } from "@/lib/terminal-themes/cursor"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Cursor"} ); } ``` # Default The default termcn terminal theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-default ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { defaultTheme } from "@/lib/terminal-themes/default"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Default ); } ``` # Dracula A purple-heavy Dracula theme for terminal UI components. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-dracula ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { draculaTheme } from "@/lib/terminal-themes/dracula"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Dracula ); } ``` # Everforest Warm dark theme with forest green tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-everforest ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { everforestTheme } from "@/lib/terminal-themes/everforest"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Everforest"} ); } ``` # Flexoki Versatile theme with warm colors and good contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-flexoki ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { flexokiTheme } from "@/lib/terminal-themes/flexoki"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Flexoki"} ); } ``` # GitHub GitHub's official dark theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-github ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { githubTheme } from "@/lib/terminal-themes/github"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"GitHub"} ); } ``` # Gruvbox Retro-style theme with warm earth tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-gruvbox ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { gruvboxTheme } from "@/lib/terminal-themes/gruvbox"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Gruvbox"} ); } ``` # High Contrast Light WCAG-friendly light high-contrast theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-high-contrast-light ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { highContrastLightTheme } from "@/lib/terminal-themes/high-contrast"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"High Contrast Light"} ); } ``` # High Contrast High contrast themes for dark and light terminal backgrounds. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-high-contrast ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { highContrastTheme } from "@/lib/terminal-themes/high-contrast"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( High Contrast ); } ``` This file also exports `highContrastLightTheme` for bright terminal backgrounds. # Kanagawa Japanese-inspired theme with wave motifs. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-kanagawa ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { kanagawaTheme } from "@/lib/terminal-themes/kanagawa"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Kanagawa"} ); } ``` # Lucent Orng Warm orange theme with translucent feel. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-lucent-orng ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { lucentOrngTheme } from "@/lib/terminal-themes/lucent-orng"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Lucent Orng"} ); } ``` # Material Material Design color palette theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-material ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { materialTheme } from "@/lib/terminal-themes/material"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Material"} ); } ``` # Matrix Green code rain inspired theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-matrix ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { matrixTheme } from "@/lib/terminal-themes/matrix"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Matrix"} ); } ``` # Mercury Clean and minimal dark theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-mercury ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { mercuryTheme } from "@/lib/terminal-themes/mercury"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Mercury"} ); } ``` # Monokai A classic Monokai-inspired theme for terminal apps. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-monokai ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { monokaiTheme } from "@/lib/terminal-themes/monokai"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Monokai ); } ``` # Night Owl Night owl theme optimized for late-night coding. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-nightowl ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { nightowlTheme } from "@/lib/terminal-themes/nightowl"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Night Owl"} ); } ``` # Nord A cool Nord palette tuned for terminal contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-nord ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { nordTheme } from "@/lib/terminal-themes/nord"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Nord ); } ``` # OC-2 Clean, minimal theme with high contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-oc-2 ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { oc2Theme } from "@/lib/terminal-themes/oc-2"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"OC-2"} ); } ``` # One Dark A One Dark theme for terminal components. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-one-dark ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { oneDarkTheme } from "@/lib/terminal-themes/one-dark"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( One Dark ); } ``` # One Dark Pro One Dark Pro - VS Code theme version. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-onedarkpro ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { onedarkproTheme } from "@/lib/terminal-themes/onedarkpro"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"One Dark Pro"} ); } ``` # OpenCode The official OpenCode theme. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-opencode ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { opencodeTheme } from "@/lib/terminal-themes/opencode"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"OpenCode"} ); } ``` # Orng Vibrant orange theme with high contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-orng ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { orngTheme } from "@/lib/terminal-themes/orng"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Orng"} ); } ``` # Osaka Jade Japanese-inspired theme with jade green tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-osaka-jade ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { osakaJadeTheme } from "@/lib/terminal-themes/osaka-jade"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Osaka Jade"} ); } ``` # Palenight Purple-tinted dark theme from React Native. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-palenight ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { palenightTheme } from "@/lib/terminal-themes/palenight"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Palenight"} ); } ``` # Rose Pine Dark theme with warm rose tones. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-rosepine ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { rosepineTheme } from "@/lib/terminal-themes/rosepine"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Rose Pine"} ); } ``` # Shades of Purple Bold purple theme with vibrant accents. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-shadesofpurple ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { shadesofpurpleTheme } from "@/lib/terminal-themes/shadesofpurple"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Shades of Purple"} ); } ``` # Solarized A Solarized theme for terminal components. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-solarized ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { solarizedTheme } from "@/lib/terminal-themes/solarized"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Solarized ); } ``` # Synthwave '84 Retro-futuristic theme with neon colors. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-synthwave84 ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { synthwave84Theme } from "@/lib/terminal-themes/synthwave84"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Synthwave '84"} ); } ``` # Tokyo Night Tokyo Night colors for terminal interfaces. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-tokyo-night ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { tokyoNightTheme } from "@/lib/terminal-themes/tokyo-night"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( Tokyo Night ); } ``` # Vercel Vercel's official brand colors. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-vercel ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { vercelTheme } from "@/lib/terminal-themes/vercel"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Vercel"} ); } ``` # Vesper Minimal stark theme with high contrast. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-vesper ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { vesperTheme } from "@/lib/terminal-themes/vesper"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Vesper"} ); } ``` # Zenburn Low-contrast theme for long coding sessions. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/opentui/theme-zenburn ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThemeProvider } from "@/providers/theme-provider"; import { zenburnTheme } from "@/lib/terminal-themes/zenburn"; import { Badge } from "@/components/ui/badge"; export function Example() { return ( {"Zenburn"} ); } ``` # Chat Message Chat message bubble with role label, streaming indicator, and collapsible content Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/chat-message ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ChatMessage } from "@/components/ui/chat-message"; ``` ```tsx Here is the refactored version of your function. ``` API Reference [#api-reference] ChatMessage [#chatmessage] | Prop | Type | Default | | ----------- | ---------------------------------------------- | ---------- | | `sender` | `"user" \| "assistant" \| "system" \| "error"` | `required` | | `name` | `string` | - | | `timestamp` | `Date` | - | | `streaming` | `boolean` | `false` | | `collapsed` | `boolean` | - | | `children` | `ReactNode` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Enter` / `Space` activate the focused action when enabled; `Escape` dismisses or cancels when supported; `Tab` / `Shift+Tab` move through Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Chat Thread Scrollable container for stacking ChatMessage components in a conversation thread Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/chat-thread ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ChatThread } from "@/components/ui/chat-thread"; import { ChatMessage } from "@/components/ui/chat-message"; ``` ```tsx How do I center a div? Use flexbox: display flex, justify-content center, align-items center. ``` API Reference [#api-reference] ChatThread [#chatthread] | Prop | Type | Default | | ------------ | ----------- | ------- | | `maxHeight` | `number` | - | | `autoScroll` | `boolean` | `true` | | `children` | `ReactNode` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Conversation History Arrow-key scrollable stack for long chat threads Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/conversation-history ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ConversationHistory } from "@/components/ui/conversation-history"; import { Text } from "ink"; ``` ```tsx user: Hello assistant: Hi — how can I help? ``` When `isActive` is true, **↑** / **↓** move the window over `children`. The view starts scrolled to the bottom (`maxHeight` lines visible). API Reference [#api-reference] ConversationHistory [#conversationhistory] | Prop | Type | Default | | ---------------- | ----------- | ------- | | `maxHeight` | `number` | `20` | | `children` | `ReactNode` | - | | `showScrollHint` | `boolean` | `true` | | `isActive` | `boolean` | `true` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Error Retry Inline error callout with retry and dismiss shortcuts Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/error-retry ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ErrorRetry } from "@/components/ui/error-retry"; ``` ```tsx refetch()} onDismiss={() => setError(null)} isActive /> ``` Shortcuts [#shortcuts] When `retryCount < maxRetries` and `isActive` is true: * **Enter** or **r** — calls `onRetry` * **Esc** — calls `onDismiss` After `retryCount >= maxRetries`, only **Esc** dismisses; retry shortcuts are disabled. API Reference [#api-reference] ErrorRetry [#errorretry] | Prop | Type | Default | | ------------ | ----------------- | ---------- | | `error` | `Error \| string` | `required` | | `onRetry` | `() => void` | - | | `onDismiss` | `() => void` | - | | `retryCount` | `number` | `0` | | `maxRetries` | `number` | `3` | | `isActive` | `boolean` | `true` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Enter` / `Space` activate the focused action when enabled; `Escape` dismisses or cancels when supported; `Tab` / `Shift+Tab` move through Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # File Change Interactive file-change review list with diff expansion, per-file accept/reject actions, and accept-all shortcut Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/file-change ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { FileChange } from "@/components/ui/file-change"; ``` ```tsx a + b;", }, { path: "src/legacy.ts", type: "delete" }, ]} onAccept={(path) => console.log("accepted", path)} onReject={(path) => console.log("rejected", path)} onAcceptAll={() => console.log("accepted all")} /> ``` API Reference [#api-reference] FileChange [#filechange] | Prop | Type | Default | | ------------- | ------------------------ | ---------- | | `changes` | `FileChangeItem[]` | `required` | | `onAccept` | `(path: string) => void` | - | | `onReject` | `(path: string) => void` | - | | `onAcceptAll` | `() => void` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # AI Components for building AI-powered chat interfaces and tool interactions. # Model Selector Keyboard-navigable list for selecting an AI model, with optional provider grouping and context-window display Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/model-selector ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ModelSelector } from "@/components/ui/model-selector"; ``` ```tsx console.log("selected", id)} /> ``` API Reference [#api-reference] ModelSelector [#modelselector] | Prop | Type | Default | | ----------------- | ---------------------- | ---------- | | `models` | `ModelOption[]` | `required` | | `selected` | `string` | `required` | | `onSelect` | `(id: string) => void` | `required` | | `showContext` | `boolean` | `true` | | `showProvider` | `boolean` | `true` | | `groupByProvider` | `boolean` | `false` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Streaming Text Token-by-token streaming text with blinking cursor and optional typing animation Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/streaming-text ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { StreamingText } from "@/components/ui/streaming-text"; ``` ```tsx ``` API Reference [#api-reference] StreamingText [#streamingtext] | Prop | Type | Default | | ------------- | ---------------------------- | ------- | | `text` | `string` | - | | `stream` | `AsyncIterable` | - | | `cursor` | `boolean` | `true` | | `animate` | `boolean` | `false` | | `speed` | `number` | `30` | | `onComplete` | `(fullText: string) => void` | - | | `cursorColor` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # Thinking Block Collapsible block for displaying extended thinking / reasoning content from an AI model Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/thinking-block ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ThinkingBlock } from "@/components/ui/thinking-block"; ``` ```tsx ``` API Reference [#api-reference] ThinkingBlock [#thinkingblock] | Prop | Type | Default | | ------------------ | --------- | ------------- | | `content` | `string` | `required` | | `streaming` | `boolean` | `false` | | `defaultCollapsed` | `boolean` | `true` | | `label` | `string` | `"Reasoning"` | | `tokenCount` | `number` | - | | `duration` | `number` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Enter` / `Space` activate the focused action when enabled; `Escape` dismisses or cancels when supported; `Tab` / `Shift+Tab` move through Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # Token Usage Compact token counter showing prompt and completion usage with optional cost estimate; also exports ContextMeter for visualising context window fill Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/token-usage ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { TokenUsage, ContextMeter } from "@/components/ui/token-usage"; ``` ```tsx ``` API Reference [#api-reference] TokenUsage [#tokenusage] | Prop | Type | Default | | ------------ | --------- | ---------- | | `prompt` | `number` | `required` | | `completion` | `number` | `required` | | `model` | `string` | - | | `showCost` | `boolean` | `false` | ContextMeter [#contextmeter] | Prop | Type | Default | | ------------- | --------- | ---------- | | `used` | `number` | `required` | | `limit` | `number` | `required` | | `label` | `string` | - | | `showPercent` | `boolean` | `true` | | `warnAt` | `number` | `75` | | `criticalAt` | `number` | `90` | | `width` | `number` | `20` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Tool Approval Interactive approval prompt for AI tool calls with risk-level badge, args display, and auto-deny timeout Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/tool-approval ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ToolApproval } from "@/components/ui/tool-approval"; ``` ```tsx console.log("approved")} onDeny={() => console.log("denied")} timeout={30} /> ``` API Reference [#api-reference] ToolApproval [#toolapproval] | Prop | Type | Default | | --------------- | ----------------------------- | ---------- | | `name` | `string` | `required` | | `description` | `string` | - | | `args` | `Record` | - | | `risk` | `"low" \| "medium" \| "high"` | `"low"` | | `onApprove` | `() => void` | `required` | | `onDeny` | `() => void` | `required` | | `onAlwaysAllow` | `() => void` | - | | `timeout` | `number` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # Tool Call Displays an AI tool invocation with status indicator, args, result, and elapsed time Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/tool-call ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ToolCall } from "@/components/ui/tool-call"; ``` ```tsx ``` API Reference [#api-reference] ToolCall [#toolcall] | Prop | Type | Default | | ------------------ | ------------------------------------------------ | ---------- | | `name` | `string` | `required` | | `args` | `Record` | - | | `status` | `"pending" \| "running" \| "success" \| "error"` | `required` | | `result` | `unknown` | - | | `duration` | `number` | - | | `collapsible` | `boolean` | `true` | | `defaultCollapsed` | `boolean` | `true` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Enter` / `Space` activate the focused action when enabled; `Escape` dismisses or cancels when supported; `Tab` / `Shift+Tab` move through Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Card Card with header, body, and footer slots Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/card ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Card } from "@/components/ui/card"; ``` ```tsx CPU: 4 cores @ 3.2 GHz ``` API Reference [#api-reference] Card [#card] | Prop | Type | Default | | ------------------- | -------------------------------------------------------------------------------------------- | ---------- | | `title` | `string` | - | | `subtitle` | `string` | - | | `children` | `ReactNode` | `required` | | `footer` | `ReactNode` | - | | `borderColor` | `string` | - | | `width` | `number` | - | | `borderStyle` | `"single" \| "double" \| "round" \| "bold" \| "singleDouble" \| "doubleSingle" \| "classic"` | `"round"` | | `paddingX` | `number` | `1` | | `paddingY` | `number` | `0` | | `footerDividerChar` | `string` | `"─"` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # Data Grid Advanced data grid with sorting, filtering, pagination, and cell editing Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/data-grid ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { DataGrid } from "@/components/ui/data-grid"; ``` ```tsx ``` API Reference [#api-reference] DataGrid [#datagrid] | Prop | Type | Default | | ------------------- | ---------------------------------------------- | ---------- | | `data` | `T[]` | `required` | | `columns` | `DataGridColumn[]` | `required` | | `pageSize` | `number` | `10` | | `onRowSelect` | `(row: T) => void` | - | | `onCellEdit` | `(row: T, key: string, value: string) => void` | - | | `borderColor` | `string` | - | | `borderStyle` | `"single" \| "double" \| "round" \| "bold"` | `"single"` | | `showRowNumbers` | `boolean` | `false` | | `filterPlaceholder` | `string` | - | DataGridColumn [#datagridcolumn] | Prop | Type | Default | | ------------ | ------------------------------------ | ---------- | | `key` | `keyof T & string` | `required` | | `header` | `string` | `required` | | `width` | `number` | - | | `align` | `"left" \| "right" \| "center"` | `"left"` | | `render` | `(value: unknown, row: T) => string` | - | | `filterable` | `boolean` | - | | `sortable` | `boolean` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Definition Term–description definition list Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/definition ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Definition } from "@/components/ui/definition"; ``` ```tsx ``` API Reference [#api-reference] Definition [#definition] | Prop | Type | Default | | ----------- | ------------------ | ---------- | | `items` | `DefinitionItem[]` | `required` | | `termColor` | `string` | - | DefinitionItem [#definitionitem] | Prop | Type | Default | | ------------- | -------- | ---------- | | `term` | `string` | `required` | | `description` | `string` | `required` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Diff View Unified, split, and inline diff viewer with LCS-based diff algorithm and line numbers Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/diff-view ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { DiffView } from "@/components/ui/diff-view"; ``` ```tsx ``` API Reference [#api-reference] DiffView [#diffview] | Prop | Type | Default | | ----------------- | ---------------------------------- | ----------- | | `oldText` | `string` | `required` | | `newText` | `string` | `required` | | `filename` | `string` | - | | `language` | `string` | - | | `mode` | `"unified" \| "split" \| "inline"` | `"unified"` | | `context` | `number` | `3` | | `showLineNumbers` | `boolean` | `false` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Visual output exposes its meaningful value through a textual alternative or bounded accessible summary. # Directory Tree Filesystem browser with expand/collapse Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/directory-tree ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { DirectoryTree } from "@/components/ui/directory-tree"; ``` ```tsx ``` API Reference [#api-reference] DirectoryTree [#directorytree] | Prop | Type | Default | | ------------ | ------------------------ | --------------- | | `rootPath` | `string` | `process.cwd()` | | `onSelect` | `(path: string) => void` | - | | `maxDepth` | `number` | `2` | | `showHidden` | `boolean` | `false` | | `label` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Git Status Git status display (branch, staged, modified, ahead/behind) Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/git-status ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { GitStatus } from "@/components/ui/git-status"; ``` ```tsx ``` API Reference [#api-reference] GitStatus [#gitstatus] | Prop | Type | Default | | ---------- | -------- | ---------- | | `branch` | `string` | `required` | | `staged` | `number` | `0` | | `modified` | `number` | `0` | | `ahead` | `number` | `0` | | `behind` | `number` | `0` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Data Components for displaying and visualizing structured data in the terminal. # JSON Pretty-printed JSON with collapsible nodes Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/json ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { JSONView } from "@/components/ui/json"; ``` ```tsx ``` API Reference [#api-reference] JSONView [#jsonview] | Prop | Type | Default | | ----------- | --------- | ---------- | | `data` | `unknown` | `required` | | `indent` | `number` | `2` | | `collapsed` | `boolean` | `false` | | `label` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Key Value Aligned key–value pairs Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/key-value ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { KeyValue } from "@/components/ui/key-value"; ``` ```tsx ``` API Reference [#api-reference] KeyValue [#keyvalue] | Prop | Type | Default | | ------------ | ---------------- | ---------- | | `items` | `KeyValueItem[]` | `required` | | `keyWidth` | `number` | - | | `separator` | `string` | `":"` | | `keyColor` | `string` | - | | `valueColor` | `string` | - | KeyValueItem [#keyvalueitem] | Prop | Type | Default | | ------- | ----------- | ---------- | | `key` | `string` | `required` | | `value` | `ReactNode` | `required` | | `color` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # List Navigable list with optional filtering Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/list ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { List } from "@/components/ui/list"; ``` ```tsx console.log(item.key)} /> ``` API Reference [#api-reference] List [#list] | Prop | Type | Default | | ------------ | -------------------------- | ---------- | | `items` | `ListItem[]` | `required` | | `onSelect` | `(item: ListItem) => void` | - | | `filterable` | `boolean` | `false` | | `height` | `number` | `10` | | `cursor` | `string` | `"›"` | ListItem [#listitem] | Prop | Type | Default | | ------------- | -------- | ---------- | | `key` | `string` | `required` | | `label` | `string` | `required` | | `description` | `string` | - | | `color` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Table Sortable, selectable, paginated data table Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/table ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Table } from "@/components/ui/table"; ``` ```tsx ``` Examples [#examples] Sortable [#sortable] Enable keyboard-driven column sorting with `sortable`. Use arrow keys to navigate columns and press `s` to sort. Selectable rows [#selectable-rows] Use `selectable` with `onSelect` to choose a row with the arrow keys and Enter. API Reference [#api-reference] Table [#table] The table draws a fixed-width grid with Unicode box-drawing characters (`╭`, `├`, `│`, …). Width follows column content; it does not stretch to the full terminal width. | Prop | Type | Default | | ------------- | ------------------ | ---------- | | `data` | `T[]` | `required` | | `columns` | `Column[]` | `required` | | `sortable` | `boolean` | `false` | | `selectable` | `boolean` | `false` | | `onSelect` | `(row: T) => void` | - | | `maxRows` | `number` | `20` | | `borderColor` | `string` | - | Column [#column] | Prop | Type | Default | | -------- | ------------------------------- | ---------- | | `key` | `keyof T & string` | `required` | | `header` | `string` | `required` | | `width` | `number` | - | | `align` | `"left" \| "right" \| "center"` | `"left"` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Tree Expandable/collapsible tree view Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/tree ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Tree } from "@/components/ui/tree"; ``` ```tsx ``` API Reference [#api-reference] Tree [#tree] | Prop | Type | Default | | ----------------- | -------------------------- | ---------- | | `nodes` | `TreeNode[]` | `required` | | `onSelect` | `(node: TreeNode) => void` | - | | `defaultExpanded` | `string[]` | `[]` | | `expandedIcon` | `string` | `"▼"` | | `collapsedIcon` | `string` | `"▶"` | | `leafIcon` | `string` | `"•"` | TreeNode [#treenode] | Prop | Type | Default | | ---------- | ------------ | ---------- | | `key` | `string` | `required` | | `label` | `string` | `required` | | `children` | `TreeNode[]` | - | | `icon` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Virtual List Virtualized list for 10k+ items Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/virtual-list ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { VirtualList } from "@/components/ui/virtual-list"; ``` ```tsx `Item ${i + 1}`)} height={10} renderItem={(item, index, isActive) => {item}} /> ``` API Reference [#api-reference] VirtualList [#virtuallist] | Prop | Type | Default | | ------------ | ---------------------------------------------------------- | ---------- | | `items` | `T[]` | `required` | | `renderItem` | `(item: T, index: number, isActive: boolean) => ReactNode` | `required` | | `height` | `number` | `required` | | `onSelect` | `(item: T, index: number) => void` | - | | `cursor` | `string` | - | | `overscan` | `number` | `2` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move the current item or viewport; `Home` / `End` move to the boundaries; `PageUp` / `PageDown` move by a page; `Enter` / `Space` select or expand when supported; `Tab` / `Shift+Tab` leave the composite. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Alert Alert box with success/error/warning/info variants Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/alert ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Alert } from "@/components/ui/alert"; ``` ```tsx Everything is ready to ship. ``` Examples [#examples] Error [#error] Use `variant="error"` to display an error alert. Warning [#warning] Use `variant="warning"` to display a warning alert. Without Border [#without-border] Set `bordered={false}` to remove the border. Custom Icon and Color [#custom-icon-and-color] Override the icon and color with `icon` and `color` props. API Reference [#api-reference] Alert [#alert] | Prop | Type | Default | | ------------- | -------------------------------------------------------------------------------------------- | -------- | | `variant` | `"success" \| "error" \| "warning" \| "info"` | `"info"` | | `title` | `string` | - | | `children` | `ReactNode` | - | | `icon` | `string` | - | | `bordered` | `boolean` | `true` | | `borderStyle` | `"single" \| "double" \| "round" \| "bold" \| "singleDouble" \| "doubleSingle" \| "classic"` | - | | `color` | `string` | - | | `paddingX` | `number` | `1` | | `paddingY` | `number` | `0` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # Banner Full-width announcement banner Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/banner ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Banner } from "@/components/ui/banner"; ``` ```tsx A new version is available. Run npx update to upgrade. ``` Examples [#examples] Success Banner [#success-banner] Error with Custom Icon [#error-with-custom-icon] API Reference [#api-reference] Banner [#banner] | Prop | Type | Default | | ------------- | ---------------------------------------------------------- | ---------- | | `children` | `ReactNode` | `required` | | `variant` | `"info" \| "warning" \| "error" \| "success" \| "neutral"` | `"info"` | | `icon` | `string` | - | | `title` | `string` | - | | `dismissible` | `boolean` | `false` | | `onDismiss` | `() => void` | - | | `color` | `string` | - | | `accentChar` | `string` | `"┃"` | | `gap` | `number` | `1` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Enter` / `Space` activate the focused action when enabled; `Escape` dismisses or cancels when supported; `Tab` / `Shift+Tab` move through Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # Feedback Components for showing progress, status, and notifications in the terminal. # Multi Progress Parallel progress display for package managers, build pipelines, and deploy tools Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/multi-progress ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { MultiProgress } from "@/components/ui/multi-progress"; ``` ```tsx ``` Examples [#examples] Compact Mode [#compact-mode] API Reference [#api-reference] MultiProgress [#multiprogress] | Prop | Type | Default | | ------------- | --------------------- | ---------- | | `items` | `MultiProgressItem[]` | `required` | | `barWidth` | `number` | `20` | | `labelWidth` | `number` | `20` | | `compact` | `boolean` | `false` | | `showPercent` | `boolean` | `true` | MultiProgressItem [#multiprogressitem] | Prop | Type | Default | | ------------ | --------------------------------------------- | ---------- | | `id` | `string` | `required` | | `label` | `string` | `required` | | `value` | `number` | `required` | | `total` | `number` | `required` | | `status` | `"pending" \| "running" \| "done" \| "error"` | - | | `statusText` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Progress Bar Determinate progress bar with percent and value/total display Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/progress-bar ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ProgressBar } from "@/components/ui/progress-bar"; ``` ```tsx ``` Examples [#examples] Custom Characters and Color [#custom-characters-and-color] API Reference [#api-reference] ProgressBar [#progressbar] | Prop | Type | Default | | ------------- | --------- | ---------- | | `value` | `number` | `required` | | `total` | `number` | - | | `width` | `number` | `30` | | `showPercent` | `boolean` | `true` | | `showEta` | `boolean` | `false` | | `fillChar` | `string` | `"█"` | | `emptyChar` | `string` | `"░"` | | `color` | `string` | - | | `label` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Progress Circle Circular progress indicator using Unicode braille Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/progress-circle ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { ProgressCircle } from "@/components/ui/progress-circle"; ``` ```tsx ``` Examples [#examples] Sizes [#sizes] API Reference [#api-reference] ProgressCircle [#progresscircle] | Prop | Type | Default | | ------------- | ---------------------- | ---------- | | `value` | `number` | `required` | | `size` | `"sm" \| "md" \| "lg"` | `"sm"` | | `color` | `string` | - | | `label` | `string` | - | | `showPercent` | `boolean` | `false` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Skeleton Shimmer loading placeholder Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/skeleton ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Skeleton } from "@/components/ui/skeleton"; ``` ```tsx ``` Examples [#examples] Static (No Animation) [#static-no-animation] API Reference [#api-reference] Skeleton [#skeleton] | Prop | Type | Default | | ---------- | --------- | ------- | | `width` | `number` | `20` | | `height` | `number` | `1` | | `animated` | `boolean` | `true` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Spinner Animated spinner with 12+ styles Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/spinner ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Spinner } from "@/components/ui/spinner"; ``` ```tsx ``` Examples [#examples] Spinner Styles [#spinner-styles] Multiple built-in animation styles. API Reference [#api-reference] Spinner [#spinner] | Prop | Type | Default | | -------- | --------------------------------------------------------------------------------- | -------- | | `type` | `SpinnerName` from [`cli-spinners`](https://github.com/sindresorhus/cli-spinners) | `"dots"` | | `label` | `string` | - | | `color` | `string` | - | | `fps` | `number` — used only with custom `frames` | `12` | | `frames` | `string[]` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Status Message Inline status message with icon and color Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/status-message ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { StatusMessage } from "@/components/ui/status-message"; ``` ```tsx All tests passed. ``` Examples [#examples] Variants [#variants] API Reference [#api-reference] StatusMessage [#statusmessage] | Prop | Type | Default | | ---------- | ----------------------------------------------------------------------- | ---------- | | `variant` | `"success" \| "error" \| "warning" \| "info" \| "loading" \| "pending"` | `"info"` | | `children` | `ReactNode` | `required` | | `icon` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Toast Auto-dismissing toast notification Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/toast ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Toast } from "@/components/ui/toast"; ``` ```tsx console.log("toast closed")} /> ``` Examples [#examples] Error with Longer Duration [#error-with-longer-duration] API Reference [#api-reference] Toast [#toast] | Prop | Type | Default | | ----------- | --------------------------------------------- | ---------- | | `message` | `string` | `required` | | `variant` | `"success" \| "error" \| "warning" \| "info"` | `"info"` | | `duration` | `number` | `3000` | | `onDismiss` | `() => void` | - | | `icon` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Screen-reader mode removes decorative output while preserving meaningful labels and state. # Confirm Yes/No confirmation prompt Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/confirm ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Confirm } from "@/components/ui/confirm"; ``` ```tsx console.log("Confirmed")} onCancel={() => console.log("Cancelled")} /> ``` API Reference [#api-reference] Confirm [#confirm] | Prop | Type | Default | | -------------- | ----------------------- | ----------- | | `message` | `string` | `required` | | `onConfirm` | `() => void` | - | | `onCancel` | `() => void` | - | | `confirmLabel` | `string` | `"Yes"` | | `cancelLabel` | `string` | `"No"` | | `defaultValue` | `boolean` | `false` | | `variant` | `"default" \| "danger"` | `"default"` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Date Picker Calendar date picker with keyboard navigation Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/date-picker ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { DatePicker } from "@/components/ui/date-picker"; ``` ```tsx console.log("Selected:", date)} onSubmit={(date) => console.log("Submitted:", date)} /> ``` API Reference [#api-reference] DatePicker [#datepicker] | Prop | Type | Default | | ----------- | ---------------------- | ------- | | `value` | `Date` | - | | `onChange` | `(date: Date) => void` | - | | `onSubmit` | `(date: Date) => void` | - | | `label` | `string` | - | | `minDate` | `Date` | - | | `maxDate` | `Date` | - | | `autoFocus` | `boolean` | `false` | | `id` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # File Picker Interactive file browser and picker File picker requires Node.js filesystem access and may not render in the browser preview. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/file-picker ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { FilePicker } from "@/components/ui/file-picker"; ``` ```tsx console.log("Selected:", path)} /> ``` API Reference [#api-reference] FilePicker [#filepicker] | Prop | Type | Default | | ------------ | ------------------------ | --------------- | | `value` | `string` | - | | `onChange` | `(path: string) => void` | - | | `onSubmit` | `(path: string) => void` | - | | `label` | `string` | - | | `startDir` | `string` | `process.cwd()` | | `extensions` | `string[]` | - | | `dirsOnly` | `boolean` | `false` | | `autoFocus` | `boolean` | `false` | | `id` | `string` | - | | `width` | `number` | `50` | | `maxVisible` | `number` | `8` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Form Field Form field wrapper with label, hint, and error Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/form-field ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { FormField } from "@/components/ui/form-field"; ``` ```tsx my-input-here ``` API Reference [#api-reference] FormField [#formfield] | Prop | Type | Default | | ------------ | ----------- | ---------- | | `label` | `string` | `required` | | `children` | `ReactNode` | `required` | | `error` | `string` | - | | `hint` | `string` | - | | `required` | `boolean` | - | | `gap` | `number` | `0` | | `errorIcon` | `string` | `"✗"` | | `labelColor` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Form Form container with validation, Ctrl+S submit, and dirty tracking Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/form ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Form } from "@/components/ui/form"; ``` ```tsx
(v ? null : "Name is required") }, { name: "email", validate: (v) => (v ? null : "Email is required") }, ]} onSubmit={(values) => console.log("Submitted:", values)} > Name and email form (Ctrl+S to submit) ``` API Reference [#api-reference] Form [#form] | Prop | Type | Default | | --------------- | ------------------------------------------- | ---------- | | `onSubmit` | `(values: Record) => void` | `required` | | `initialValues` | `Record` | `{}` | | `fields` | `FormField[]` | `[]` | | `children` | `ReactNode` | `required` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Ctrl+S` validates and submits the form; `Escape` cancels it. Invalid submission focuses the first invalid field. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Forms Components for building multi-step forms and handling user submissions. # Time Picker Time picker with hour/minute/second spinners Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/time-picker ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { TimePicker } from "@/components/ui/time-picker"; ``` ```tsx console.log("Changed:", time)} onSubmit={(time) => console.log("Submitted:", time)} /> ``` API Reference [#api-reference] TimePicker [#timepicker] | Prop | Type | Default | | ----------- | ---------------------------------------------------- | ------- | | `value` | `{ hours: number; minutes: number }` | - | | `onChange` | `(time: { hours: number; minutes: number }) => void` | - | | `onSubmit` | `(time: { hours: number; minutes: number }) => void` | - | | `label` | `string` | - | | `format` | `12 \| 24` | `24` | | `autoFocus` | `boolean` | `false` | | `id` | `string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Wizard Multi-step wizard with per-step validation Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/wizard ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { Wizard } from "@/components/ui/wizard"; ``` ```tsx Install dependencies, }, { key: "configure", title: "Configure", content: Set up your preferences, }, { key: "finish", title: "Finish", content: Review and confirm your settings, }, ]} onComplete={(keys) => console.log("Completed:", keys)} onCancel={() => console.log("Cancelled")} /> ``` API Reference [#api-reference] Wizard [#wizard] | Prop | Type | Default | | -------------- | ------------------------------------ | ---------- | | `steps` | `WizardStep[]` | `required` | | `onComplete` | `(completedSteps: string[]) => void` | - | | `onCancel` | `() => void` | - | | `showProgress` | `boolean` | `true` | WizardStep [#wizardstep] | Prop | Type | Default | | ---------- | ------------------------- | ---------- | | `key` | `string` | `required` | | `title` | `string` | `required` | | `content` | `ReactNode` | `required` | | `validate` | `() => boolean \| string` | - | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** Arrow keys move inside the composite; `Home` / `End` select the first or last enabled item; `Enter` / `Space` activate, select, or toggle; `Escape` cancels or closes an owned surface; `Tab` / `Shift+Tab` move between termcn/Ink focus targets. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Email Input Email input with validation and domain suggestions Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/email-input ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { EmailInput } from "@/components/ui/email-input"; ``` ```tsx console.log("Submitted:", value)} /> ``` API Reference [#api-reference] EmailInput [#emailinput] | Prop | Type | Default | | ------------- | ------------------------- | ---------------------------------------------------------- | | `value` | `string` | - | | `onChange` | `(value: string) => void` | - | | `onSubmit` | `(value: string) => void` | - | | `label` | `string` | - | | `placeholder` | `string` | `"you@example.com"` | | `autoFocus` | `boolean` | `false` | | `id` | `string` | - | | `width` | `number` | `40` | | `suggestions` | `string[]` | `["gmail.com", "yahoo.com", "hotmail.com", "outlook.com"]` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Left` / `Right` move by grapheme, `Home` / `End` move to the boundaries, and `Backspace` / `Delete` remove one complete grapheme. `Enter` submits or confirms (`Ctrl+Enter` in TextArea); `Tab` / `Shift+Tab` leave through Ink focus traversal. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Input Text input components for capturing user input in the terminal. # Masked Input Masked input for phone, date, credit card formats Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/masked-input ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { MaskedInput } from "@/components/ui/masked-input"; ``` ```tsx ``` API Reference [#api-reference] MaskedInput [#maskedinput] | Prop | Type | Default | | ------------- | ------------------------- | ---------- | | `mask` | `string` | `required` | | `value` | `string` | - | | `onChange` | `(value: string) => void` | - | | `onSubmit` | `(value: string) => void` | - | | `label` | `string` | - | | `placeholder` | `string` | - | | `autoFocus` | `boolean` | `false` | | `id` | `string` | - | | `width` | `number` | `40` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Left` / `Right` move by grapheme, `Home` / `End` move to the boundaries, and `Backspace` / `Delete` remove one complete grapheme. `Enter` submits or confirms (`Ctrl+Enter` in TextArea); `Tab` / `Shift+Tab` leave through Ink focus traversal. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Number Input Numeric input with increment/decrement and bounds Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/number-input ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { NumberInput } from "@/components/ui/number-input"; ``` ```tsx console.log("Value:", value)} /> ``` API Reference [#api-reference] NumberInput [#numberinput] | Prop | Type | Default | | ------------- | -------------------------------------------------------------------------------------------- | ------------------------ | | `value` | `number` | - | | `onChange` | `(value: number) => void` | - | | `onSubmit` | `(value: number) => void` | - | | `min` | `number` | - | | `max` | `number` | - | | `step` | `number` | `1` | | `placeholder` | `string` | `""` | | `label` | `string` | - | | `id` | `string` | - | | `format` | `(n: number) => string` | - | | `borderStyle` | `"single" \| "double" \| "round" \| "bold" \| "singleDouble" \| "doubleSingle" \| "classic"` | `"round"` | | `paddingX` | `number` | `1` | | `cursor` | `string` | `"█"` | | `stepHint` | `string` | `"↑ +{step} ↓ -{step}"` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Left` / `Right` move by grapheme, `Home` / `End` move to the boundaries, and `Backspace` / `Delete` remove one complete grapheme. `Enter` submits or confirms (`Ctrl+Enter` in TextArea); `Tab` / `Shift+Tab` leave through Ink focus traversal. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Password Input Password input with masked characters and reveal toggle Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/password-input ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { PasswordInput } from "@/components/ui/password-input"; ``` ```tsx console.log("Password:", value)} /> ``` API Reference [#api-reference] PasswordInput [#passwordinput] | Prop | Type | Default | | ------------- | -------------------------------------------------------------------------------------------- | --------- | | `value` | `string` | - | | `onChange` | `(value: string) => void` | - | | `onSubmit` | `(value: string) => void` | - | | `placeholder` | `string` | `""` | | `mask` | `string` | `"●"` | | `showToggle` | `boolean` | `false` | | `label` | `string` | - | | `id` | `string` | - | | `borderStyle` | `"single" \| "double" \| "round" \| "bold" \| "singleDouble" \| "doubleSingle" \| "classic"` | `"round"` | | `paddingX` | `number` | `1` | | `width` | `number` | - | | `cursor` | `string` | `"█"` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Left` / `Right` move by grapheme, `Home` / `End` move to the boundaries, and `Backspace` / `Delete` remove one complete grapheme. `Enter` submits or confirms (`Ctrl+Enter` in TextArea); `Tab` / `Shift+Tab` leave through Ink focus traversal. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Path Input Filesystem path input with tab autocomplete Path input requires Node.js filesystem access and may not render in the browser preview. Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/path-input ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { PathInput } from "@/components/ui/path-input"; ``` ```tsx console.log("Selected:", path)} /> ``` API Reference [#api-reference] PathInput [#pathinput] | Prop | Type | Default | | ------------- | ------------------------- | ------- | | `value` | `string` | - | | `onChange` | `(value: string) => void` | - | | `onSubmit` | `(value: string) => void` | - | | `label` | `string` | - | | `placeholder` | `string` | `"/"` | | `autoFocus` | `boolean` | `false` | | `id` | `string` | - | | `width` | `number` | `40` | | `filter` | `string` | - | | `dirsOnly` | `boolean` | `false` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Left` / `Right` move by grapheme, `Home` / `End` move to the boundaries, and `Backspace` / `Delete` remove one complete grapheme. `Enter` submits or confirms (`Ctrl+Enter` in TextArea); `Tab` / `Shift+Tab` leave through Ink focus traversal. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Search Input Fuzzy search input with autocomplete Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/search-input ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { SearchInput } from "@/components/ui/search-input"; ``` ```tsx console.log("Selected:", item)} /> ``` API Reference [#api-reference] SearchInput [#searchinput] | Prop | Type | Default | | --------------- | -------------------------------------------------------------------------------------------- | ------------- | | `options` | `T[]` | - | | `getValue` | `(item: T) => string` | - | | `value` | `string` | - | | `defaultValue` | `string` | `""` | | `onValueChange` | `(query: string) => void` | - | | `onChange` | `(query: string) => void` | - | | `onSelect` | `(item: T) => void` | - | | `placeholder` | `string` | `"Search..."` | | `label` | `string` | - | | `maxResults` | `number` | `5` | | `id` | `string` | - | | `borderStyle` | `"single" \| "double" \| "round" \| "bold" \| "singleDouble" \| "doubleSingle" \| "classic"` | `"round"` | | `paddingX` | `number` | `1` | | `cursor` | `string` | `"█"` | | `cursorOrigin` | `{x: number; y: number}` | - | | `searchIcon` | `string` | `"🔍 "` | | `resultCursor` | `string` | `"› "` | Notes [#notes] Accessibility [#accessibility] termcn exposes the following behavior through Ink's terminal accessibility APIs. This is not a browser ARIA or general WCAG-conformance claim. * **Keyboard:** `Left` / `Right` move by grapheme, `Home` / `End` move to the boundaries, and `Backspace` / `Delete` remove one complete grapheme. `Enter` submits or confirms (`Ctrl+Enter` in TextArea); `Tab` / `Shift+Tab` leave through Ink focus traversal. * **Focus and composition:** Input is active only while the component's focus target is focused, enabled, active, and inside the topmost focus scope. * **Screen reader:** Ink labels and semantic state expose the component without relying on visual styling alone. # Text Area Multi-line text editor with word wrap Installation [#installation] Command Manual ```bash npx shadcn@latest add @termcn/ink/text-area ``` Install the following dependencies: ```bash npm install ink ``` Copy and paste the following code into your project. Update the import paths to match your project setup. Usage [#usage] ```tsx import { TextArea } from "@/components/ui/text-area"; ``` ```tsx