Skip to main content

Module focus

Module focus 

Source
Expand description

Keyboard focus management — framework-agnostic.

FocusManager maintains an ordered list of focusable component IDs (collected via depth-first traversal of the component tree) and provides Tab / Shift-Tab cycling. It depends only on core types, so every backend (ratatui, Slint, …) shares a single implementation.

Backends with native focus (e.g. Slint) may still use this to reproduce the ratatui Tab order in tests, or to drive focus when native focus is disabled.

Structs§

FocusManager
Manages keyboard focus across interactive components.

Constants§

FOCUSABLE_TYPES
Component types that can receive keyboard focus.