Expand description
Binary-space-partition tiling layout engine for ratatui.
This crate handles pane splits, focus navigation, resize, and movement. It only computes rectangles; you render each pane yourself and handle terminal input however you like.
§Quick start
use ratatui::layout::Direction;
use ratatui_hypertile::{Hypertile, HypertileAction, EventOutcome};
let mut layout = Hypertile::new();
let pane = layout.split_focused(Direction::Horizontal).unwrap();
let outcome = layout.apply_action(HypertileAction::FocusNext);
assert_eq!(outcome, EventOutcome::Consumed);§Two-crate design
| Crate | Purpose |
|---|---|
ratatui-hypertile (this crate) | Lightweight layout engine, no input handling, no rendering opinions |
ratatui-hypertile-extras | Full runtime with plugins, vim-style keymaps, command palette, workspace tabs, and pane-move animations |
Use the core crate when you want full control over input and rendering. Use extras when you want a working tiling UI out of the box.
Modules§
- prelude
- Re-exports every public type for quick
use ratatui_hypertile::prelude::*. - raw
- Low-level tree types and state.
Structs§
- Hypertile
- BSP tiling layout engine.
- Hypertile
Builder - Builder for
Hypertile. - Hypertile
Widget StatefulWidgetthat calls a closure for each pane.- KeyChord
- Key code plus modifiers.
- Modifiers
- Modifier keys.
- PaneId
- Stable pane identifier, never reused within one
Hypertileinstance. - Pane
Snapshot - A pane’s id, rectangle, and focus state at one point in time.
Enums§
- Event
Outcome - Whether an event handler consumed an event.
- Hypertile
Action - Layout command for
Hypertile::apply_action. - Hypertile
Event - Event delivered to the layout engine or runtime.
- KeyCode
- Backend-agnostic key code.
- Move
Scope - How pane moves are resolved.
- Split
Policy - Split ratio policy.
- State
Error - Returned when a tree operation cannot be applied.
- Towards
Startmeans left or up.Endmeans right or down.