Skip to content

pito-header

The demo: stepping through groups and numbered sections, drilling into a nightly check and back, and the double ctrl+c quit hint

pito-header is the top of a PITO MD terminal app, as a small ratatui 0.30 crate: groups of numbered sections in two nested rows, drill-in with a breadcrumb, and optional title, facts and notice rows, all abbreviating to fit the width. It has no app logic and no words of its own: the app passes in every name, every style and every key.

It works on Linux, Windows and macOS, and CI tests it on all three.

Full header, drawn at 150 columns 8.7 µs a frame (mean of 200,000)
Nav rows alone / a click hit-test 2.1 µs / 0.11 µs
Allocations while drawing or hit-testing 0 (a counting allocator in the tests holds it)
Dependencies 3: ratatui, unicode-segmentation, unicode-width; no terminal backend unless you turn on crossterm
Size about 1,540 lines of Rust, 75 tests

Measured on 2026-10-14 on an AMD Ryzen 9 9950X with Rust 1.97.1, with cargo run --release --example bench 200000. Measure draw time shows how to run it on your machine.

pito-header is one of the ratatui crates behind PITO MD’s terminal apps, with pito-footer, pito-list, pito-hourglass and pito-tui, the shell that brings them together.

The code is MIT licensed, by Catalin Ilinca. The PITO MD name and its logos are © Catalin Ilinca, all rights reserved, and not covered by the MIT licence.