From ink
Build terminal UIs for React CLI apps using Ink component patterns: layouts, lists with icons, status messages, progress indicators, and collapsible sections.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ink:ink-component-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are an expert in building terminal UIs with Ink, React for the terminal.
You are an expert in building terminal UIs with Ink, React for the terminal.
import { Box, Text } from 'ink';
import React from 'react';
interface MyComponentProps {
title: string;
items: string[];
}
export const MyComponent: React.FC<MyComponentProps> = ({ title, items }) => {
return (
<Box flexDirection="column">
<Text bold color="cyan">
{title}
</Text>
{items.map((item, index) => (
<Box key={index} marginLeft={2}>
<Text>• {item}</Text>
</Box>
))}
</Box>
);
};
<Box flexDirection="column">
<Text>First item</Text>
<Text>Second item</Text>
</Box>
<Box>
<Text>Left</Text>
<Spacer />
<Text>Right</Text>
</Box>
<Box justifyContent="center" alignItems="center" height={10}>
<Text>Centered content</Text>
</Box>
<Box padding={1} borderStyle="round" borderColor="cyan">
<Text>Content with border and padding</Text>
</Box>
interface ListItem {
icon: string;
label: string;
value: string;
}
const List: React.FC<{ items: ListItem[] }> = ({ items }) => (
<Box flexDirection="column">
{items.map((item, i) => (
<Box key={i}>
<Text color="yellow">{item.icon} </Text>
<Text bold>{item.label}: </Text>
<Text>{item.value}</Text>
</Box>
))}
</Box>
);
const StatusMessage: React.FC<{ type: 'success' | 'error' | 'warning'; message: string }> = ({
type,
message,
}) => {
const config = {
success: { icon: '✅', color: 'green' },
error: { icon: '❌', color: 'red' },
warning: { icon: '⚠️', color: 'yellow' },
};
const { icon, color } = config[type];
return (
<Box>
<Text color={color}>
{icon} {message}
</Text>
</Box>
);
};
const ProgressIndicator: React.FC<{ current: number; total: number; label: string }> = ({
current,
total,
label,
}) => (
<Box>
<Text color="blue">
{label}: {current}/{total}
</Text>
</Box>
);
const CollapsibleSection: React.FC<{ title: string; isOpen: boolean; children: React.ReactNode }> = ({
title,
isOpen,
children,
}) => (
<Box flexDirection="column">
<Text bold>
{isOpen ? '▼' : '▶'} {title}
</Text>
{isOpen && <Box marginLeft={2}>{children}</Box>}
</Box>
);
npx claudepluginhub thebushidocollective/han --plugin inkBuilds Flexbox-based terminal layouts in CLI apps using Ink's Box for positioning, spacing, alignment, dimensions, borders and Text for colors.
Provides design patterns for terminal user interfaces: layout paradigms, keyboard navigation, visual systems, and TUI anti-pattern validation. Works with Ratatui, Ink, Textual, Bubbletea, or any TUI framework.
Provides CLI design patterns for arguments/flags/subcommands and TUI patterns for frameworks in Go/Python/JS/Rust, interactions, and colors in terminal apps.