Skip to main content

Crate ratatui_hypertile

Crate ratatui_hypertile 

Source
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

CratePurpose
ratatui-hypertile (this crate)Lightweight layout engine, no input handling, no rendering opinions
ratatui-hypertile-extrasFull 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.
HypertileBuilder
Builder for Hypertile.
HypertileWidget
StatefulWidget that calls a closure for each pane.
KeyChord
Key code plus modifiers.
Modifiers
Modifier keys.
PaneId
Stable pane identifier, never reused within one Hypertile instance.
PaneSnapshot
A pane’s id, rectangle, and focus state at one point in time.

Enums§

EventOutcome
Whether an event handler consumed an event.
HypertileAction
Layout command for Hypertile::apply_action.
HypertileEvent
Event delivered to the layout engine or runtime.
KeyCode
Backend-agnostic key code.
MoveScope
How pane moves are resolved.
SplitPolicy
Split ratio policy.
StateError
Returned when a tree operation cannot be applied.
Towards
Start means left or up. End means right or down.