Claude-skill-registry ink
Build CLI applications using React. Use when creating terminal UIs, handling keyboard input, or building interactive command-line tools with React components. Supports flexbox layouts, text styling, focus management, and accessibility.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/ink" ~/.claude/skills/majiayu000-claude-skill-registry-ink && rm -rf "$T"
manifest:
skills/data/ink/SKILL.mdsource content
Ink - React for CLIs
React for CLIs. Build and test your CLI output using components.
Ink provides the same component-based UI building experience that React offers in the browser, but for command-line apps. It uses Yoga for Flexbox layouts in the terminal.
Important: All text must be wrapped in a
component.<Text>
Quick Example
import {render, Text, Box} from 'ink'; render( <Box borderStyle="round" padding={1}> <Text color="green">Hello World</Text> </Box> );
Components
- Display text with styling (color, bold, italic, underline, etc.)<Text>
- Flexbox container for layouts<Box>- Layout Properties - dimensions, flex, spacing, alignment
- Visual Properties - borders, colors, backgrounds
- Insert newline characters<Newline>
- Flexible space that expands to fill available space<Spacer>
- Permanently render output above everything else (for logs, completed tasks)<Static>
- Transform string representation before output<Transform>
Hooks
Interaction
- Handle keyboard input (arrow keys, enter, escape, etc.)useInput()
- Make components focusable with Tab keyuseFocus()
- Programmatically manage focususeFocusManager()
Lifecycle & Streams
- Exit the app programmaticallyuseApp()
- Access stdin stream and setRawModeuseStdin()
- Access stdout stream and write outputuseStdout()
- Access stderr streamuseStderr()
Accessibility
- Detect if screen reader is activeuseIsScreenReaderEnabled()
API
- Mount and render your apprender(tree, options?)- Instance Methods - rerender(), unmount(), waitUntilExit(), clear()
- Get width and height of a componentmeasureElement(ref)
Guides
- Accessibility & Screen Readers - ARIA support, screen reader integration
- Testing - Test Ink components with ink-testing-library
- React DevTools - Debug with React DevTools
Third-Party Components
See references/third-party.md for a comprehensive list of community components including:
- Text inputs, spinners, select menus
- Progress bars, tables, charts
- Markdown rendering, syntax highlighting
- And many more