Widgets
Hex1b provides a rich library of widgets for building terminal user interfaces. Widgets are immutable configuration objects that describe what to render—the framework handles the rest.
Layout Widgets
Widgets for organizing and positioning content.
- Stacks (HStack/VStack) — Arrange children horizontally or vertically
- Grid — Two-dimensional grid layout with row/column spanning
- Border — Bordered containers with optional titles
- Align — Position content within available space
- Scroll — Scrollable content areas for overflow
- Splitter — Resizable split views
- DragBarPanel — Panels with built-in resize handles
- Float — Remove widgets from layout flow and position them absolutely or relative to siblings
- WrapPanel — Flow-based layout that wraps children to the next row or column
- Responsive — Breakpoint-based adaptive layouts
- Windows — Floating, draggable window panels
Interactive Widgets
Widgets that respond to user input.
- Button — Clickable buttons with keyboard support
- Checkbox — Toggleable checked/unchecked/indeterminate state
- Drag & Drop — Draggable sources, droppable targets, and positional insertion
- SplitButton — Button with dropdown for secondary actions
- TabPanel — Tabbed interface for organizing content into switchable panels
- Accordion — Collapsible section container for sidebar-style layouts
- TextBox — Single and multi-line text input
- List — Scrollable, selectable item lists
- Tree — Hierarchical data with expand/collapse and multi-select
- Table — Data tables with sorting, selection, and virtualization
- TilePanel — Infinite, pannable and zoomable tile map
- Picker — Dropdown selection menus
- Slider — Numeric value selection with keyboard and mouse
- ToggleSwitch — On/off toggle controls
- Navigator — Stack-based page navigation
Display Widgets
Widgets for presenting information.
- Charts — Column, bar, breakdown, time series, and scatter charts
- Icon — Single character or emoji display with optional click
- InfoBar — Status bars for contextual information
- Markdown — Rich markdown content with headings, code blocks, tables, and links
- Notifications — Floating notifications with actions and drawer
- Text — Rich text with styling and formatting
- Progress — Progress bars for known completion amounts
- Spinner — Animated activity indicators
- Hyperlink — Clickable terminal hyperlinks (OSC 8)
- QrCode — Render QR codes in the terminal
- KgpImage — Display pixel images via the Kitty Graphics Protocol
Utility Widgets
Widgets for special behaviors.
- EffectPanel — Visual post-processing effects on rendered output
- Rescue — Error boundaries for graceful failure handling
- StatePanel — Identity-anchored state, animations, and list reorder preservation
- ThemePanel — Scope theme overrides to subtrees
- Terminal — Embed child terminal sessions
- Surface — Low-level rendering with layered compositing