Glyph
React renderer
for terminal UIs
Build real terminal applications with React. Full component model with flexbox layout, focus management, keyboard input, and efficient diff-based rendering. Write TUIs the same way you write web apps.
// app.tsx import { render, Box, Text } from "@semos-labs/glyph"; function App() { return ( <Box border="round" padding={1}> <Text bold>Hello, Glyph!</Text> </Box> ); } render(<App />);
Quick Start
Create a new project
$ bun create @semos-labs/glyph my-app $ cd my-app && bun dev Add to existing project
$ bun add @semos-labs/glyph react Features
Flexbox Layout
Full CSS-like flexbox via Yoga — rows, columns, wrapping, alignment, gaps, padding.
Rich Components
Box, Text, Input, Button, Checkbox, Radio, Select, ScrollView, List, Menu, Progress, Spinner, Image, Toasts, Dialogs, and more.
Focus System
Tab navigation, focus scopes, focus trapping for modals, JumpNav quick-jump hints.
Keyboard Input
useInput hook, declarative <Keybind> component, vim-style bindings, priority keybinds.
Smart Rendering
Double-buffered framebuffer with character-level diffing — only changed cells are written.
True Colors
Named colors, hex, RGB, 256-palette. Auto-contrast text on colored backgrounds.
Borders & Styling
Single, double, rounded, and ASCII border styles. Bold, dim, italic, underline text.
TypeScript First
Full type coverage. Every prop, style, and hook is typed.
Components
<Box>
Flexbox container — the fundamental building block
<Text>
Styled text with ANSI escape code support
<Input>
Text input with masks, multiline, and validation
<Button>
Focusable button with press handling
<Select>
Dropdown with type-to-filter search
<List>
Keyboard-navigable selection list
<ScrollView>
Scrollable container with virtualization
<Image>
Inline images via Kitty/iTerm2 protocol
<Menu>
Styled menu with labels and disabled items
<Portal>
Fullscreen overlay for modals
<JumpNav>
Vimium-style quick navigation hints
<DialogHost>
Imperative alert() and confirm() dialogs