No description
  • Rust 98.1%
  • Python 1.3%
  • Nix 0.6%
Find a file
2026-08-11 15:24:30 +09:00
crates feat(ratatui): serve custom leaves from one keyed registry ✨ 2026-08-07 14:00:39 +09:00
docs/contributing feat: implement core, layout, dispatch, and ratatui/bevy backends ✨🏗️ 2026-08-05 21:40:07 +09:00
src fix: activate tabs on completed pointer clicks 🐛 2026-08-11 15:24:30 +09:00
support/scripts chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
tests fix: activate tabs on completed pointer clicks 🐛 2026-08-11 15:24:30 +09:00
.dockerignore chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
.editorconfig chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
.gitattributes chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
.gitignore chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
.taplo.toml chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
Cargo.lock feat: mounts, rich text, scroll/focus APIs, overlays and tab scopes ✨ 2026-08-06 16:06:35 +09:00
Cargo.toml feat: implement core, layout, dispatch, and ratatui/bevy backends ✨🏗️ 2026-08-05 21:40:07 +09:00
flake.lock chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
flake.nix chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
LICENSE chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
LICENSE.GPL chore: bootstrap crate scaffolding for yap5 directional ui 🎉🔧 2026-07-27 16:12:02 +09:00
README.md feat: mounts, rich text, scroll/focus APIs, overlays and tab scopes ✨ 2026-08-06 16:06:35 +09:00

directional-ui

Backend-agnostic layout, display-list, and focus/dispatch model for UIs driven by directional input.

License: LGPL-3.0

Workspace

This repository has three crates:

  • directional-ui: core scene builder, stable keys, layout, display list, hit testing, persistent interaction state, command hints, widgets, and event dispatch.
  • directional-ui-ratatui: terminal measurement, display-list rendering into a ratatui::Buffer, crossterm event mapping, and a terminal Theme.
  • directional-ui-bevy: Bevy plugin, display-list-to-entity rebuild systems, stable custom mount entities, input mapping, font measurement, and a Bevy Theme.

The terminal backend's public API exposes ratatui and crossterm types. Its dependency floor is ratatui 0.30 and crossterm 0.29; consumers must use compatible versions of those crates.

The normal frame loop is:

build -> layout -> sync -> paint -> dispatch -> paint -> draw

Build creates a retained Scene from app data. Layout solves rectangles. Sync clamps persistent State to the current scene. Paint fills the keyed display list and hints. Dispatch applies one input event to state and returns a Response. Paint runs again to reflect focus, hover, press, scroll, or popup changes before the backend draws.

Examples

Backend smoke examples live in:

  • crates/directional-ui-ratatui/examples/terminal_smoke.rs
  • crates/directional-ui-ratatui/examples/custom_mount.rs
  • crates/directional-ui-bevy/examples/bevy_smoke.rs

Run them with cargo run -p directional-ui-ratatui --example terminal_smoke or cargo run -p directional-ui-bevy --example bevy_smoke.

Contributing

See docs/contributing/.

License

LGPL-3.0-or-later © 2026 kp2pml30

The LGPL (LICENSE) applies as an additional permission on top of the GPL (LICENSE.GPL).