ratatui-labs
Experimental Ratatui labs-style APIs and prototype Ratatui work.
This crate is a Ratatui namespace reservation that can host small experiments before they are ready to move into focused crates or the main Ratatui repository. APIs in this crate are experimental and may change or disappear.
ratatui-labs is not intended to become a broad implementation crate. When an
experiment grows a clear concept boundary, prefer a focused crate with its own
crate-level documentation, examples, and validation. This crate can then provide
a short compatibility namespace for the experiment while the API is evaluated.
Command Palette Experiment
The command palette experiment now lives in two concept-owned crates:
ratatui-actionfor semantic action identity, metadata, availability, inputs, and invocations.ratatui-command-palettefor palette state, filtering, selection, and event emission.
The palette does not own application state or execute application callbacks. It consumes action metadata and emits invocation, preview, and lifecycle events that the application handles.
use ;
let actions = vec!;
let mut palette = new;
palette.open;
if let Some = palette.accept
Run the first interactive example with:
Rendered validation for this example is captured by the repository Betamax tape:
Layout Experiment
The frame-local layout coordination experiment lives in ratatui-layout.
It records visible regions, focus targets, pointer targets, cursor requests,
viewport metadata, and scroll metrics produced by a render pass so applications
can route later input events without adopting a retained widget tree.
Start with ratatui_layout::docs when exploring the coordination model, or use
the umbrella re-export:
use ;
use Rect;
let frame = new
.mouse;
assert_eq!;
Text Wrapping Experiment
The ratatui-textwrap experiment materializes styled Span, Line, and Text inputs as owned,
wrapped text. The umbrella crate exposes it as ratatui_labs::textwrap; the focused
ratatui-textwrap README is the canonical usage guide.
use Line;
use ;
let wrapping = new.algorithm;
let wrapped = wrapping.wrap;
assert_eq!;
Custom widgets can call textwrap::algorithms::paragraph::wrap_line or the line-level first-fit and
optimal-fit functions without constructing a complete Text.
The crate points at the main Ratatui project rather than a separate implementation repository:
Documentation for this reservation crate is published at:
Derive Macro Experiment
The derive macro experiment lives in ratatui-derive. It currently provides
FromRect, a proc macro for named layout-area structs that generates
impl From<Rect> for YourStruct.
The API is experimental and published with a beta version while the name, attribute grammar, and generated public contract are evaluated in real applications.
use Rect;
use FromRect;
let area = new;
let areas = from;
assert_eq!;
Related Crates And Overlap
This reservation may overlap with:
ratatui-unstable,ratatui-experimental, and future unstable API policy.- the experimental
ratatui-actionandratatui-command-palettecrates in this workspace. - the experimental
ratatui-layoutcrate in this workspace. - the experimental
ratatui-textwrapcrate in this workspace.
Any future implementation should coordinate with those crates or clearly explain the difference before publishing a non-reservation release.