Widget catalog
This is the A-Z index of widgets shipping in
ftui-widgets.
Every widget listed below has a concrete implementation in the tree — nothing
is planned or placeholder. File and line references point to the primary
struct or pub fn render declaration.
For the trait contracts these widgets implement, see traits. For the mental model of how widgets fit into the render pipeline, see overview. The flagship widgets (command palette, virtualized list, table, tree, modal stack) have their own deep-dive pages linked at the end.
“Stateful?” means the widget implements StatefulWidget and requires you
to carry a matching State type on your model. “No” means the widget is
pure Widget — fire and forget.
Containers and layout
Widgets whose primary job is to house other widgets or allocate space.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
Block | No | block.rs:93 | Borders, titles, padding wrapper | 9 border styles (thin / thick / double / rounded / block / …) |
Panel | No | panel.rs:33 | Titlebar + shadow + optional border | Drop shadow with adjustable opacity |
Group | No | group.rs:7 | Logical grouping container | Transparent composition; no rendering of its own |
Align | No | align.rs:20 | Horizontal / vertical alignment wrapper | Uses measured intrinsic size to centre or justify |
Padding | No | padding.rs:28 | Inset padding (top / right / bottom / left) | Zero-alloc: just shrinks the rect |
Columns | No | columns.rs:40 | Multi-column layout with flex ratios | Column widths resolve via the layout constraint solver |
Rule | No | rule.rs:30 | Horizontal / vertical separator line | Inline label support (”── Section ──“) |
Cached | Yes | cached.rs:68 | Memoises a widget’s rendering by key | FnKey / HashKey / NoCacheKey strategies |
Pretty | No | pretty.rs:15 | Pretty-print structured data (debug, JSON-ish) | Works on any Debug type |
Layout | No | layout.rs | Widget-facing re-export of ftui-layout splitters | Backed by the constraint solver; see layout |
Text and display
Widgets that render text, glyphs, or status indicators.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
Paragraph | No | paragraph.rs:35 | Multi-line styled text with word-wrap | Span-aware wrap preserves per-range styling |
Help | Yes | help.rs:147 | Contextual keybinding help overlay | History ring + help index for discoverability |
Badge | No | badge.rs:20 | Status / priority pill | Intrinsic-sizes to content |
Emoji | No | emoji.rs:20 | Emoji picker / shortcode resolver | Width-aware (wide emoji take 2 cells) |
StatusLine | No | status_line.rs:40 | Multi-segment status footer | Segments negotiate width when crowded |
GlowingText | No | ftui-extras | Animated gradient headings (extras) | Lives in ftui-extras; feature-gated |
Selection and navigation
Widgets where the user picks something.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
List | Yes | list.rs:76 | Single-column list with selection | Render clamps offset to keep selected in view |
Table | Yes | table.rs:78 | Multi-column table with row / cell selection | Full theming via TableTheme; see table |
Tabs | Yes | tabs.rs:178 | Tab bar with active selection | Overflow behaviour: truncate, scroll, or wrap |
Tree | Yes | tree.rs:304 | Hierarchical expand / collapse | Lazy-load hooks; see tree |
FilePicker | Yes | file_picker.rs:72 | File browser with path navigation | Breadcrumb trail, filter predicates |
CommandPalette | Yes | command_palette/mod.rs | Searchable command launcher | Bayesian evidence ledger; see command palette |
Paginator | No | paginator.rs:37 | Page navigation control (prev / next / jump) | Intrinsic sizes based on total page count |
Input widgets
Widgets that capture keystrokes.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
Input (TextInput) | No | input.rs:142 | Single-line text input | Stateless — parent holds the String, cursor reported to frame |
Textarea | No | textarea.rs:94 | Multi-line editor with soft-wrap | Integrates with the rope editor |
Both are documented on input + textarea.
Progress and indicators
Widgets that show progress, activity, or measurements.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
Progress | No | progress.rs:60 | Progress bar with % fill, label | Adaptive fill glyph under degradation |
Sparkline | No | sparkline.rs:30 | Inline spark graph | Uses block glyphs ▁▂▃▄▅▆▇█ for 8-level resolution |
Spinner | No | spinner.rs:32 | Animated loading spinner | 8+ animation frame families |
Scrollbar | Yes | scrollbar.rs:85 | Vertical / horizontal scrollbar | Thumb size scales with viewport:content ratio |
Stopwatch | No | stopwatch.rs:32 | Elapsed-time display | Monotonic; resistant to wall-clock jumps |
Timer | No | timer.rs:20 | Countdown display | Same plumbing as Stopwatch, inverted |
Overlays and modals
Widgets that sit on top of other content.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
Modal | Yes | modal/container.rs:47 | Overlay dialog with backdrop | Entrance / exit animations; see modal stack |
Dialog | Yes | modal/dialog.rs:88 | Pre-built dialog (OK / Cancel / custom) | Buttons auto-register focus nodes |
Toast | Yes | toast.rs:105 | Transient notification | Entrance / exit animation; auto-dismiss |
NotificationQueue | Yes | notification_queue.rs:85 | Priority queue of toasts | Collapses redundant toasts by dedup key |
Popover | No | popover.rs:35 | Anchored floating content | Auto-flip when hitting viewport edge |
Dev and diagnostics
Widgets you reach for when something is weird.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
Inspector | Yes | inspector.rs:283 | Overlay showing widget tree, hit-test regions, a11y tree | 100K+ LOC of introspection in a single widget |
DebugOverlay | Yes | debug_overlay.rs:92 | Performance metrics, frame timing | FPS / budget / dirty-row stats in situ |
ConstraintOverlay | Yes | constraint_overlay.rs:115 | Visualises layout constraints and allocations | Shows every Rect layout computed this frame |
LogViewer | Yes | log_viewer.rs:193 | Scrollable log display with search / filtering | Ring-buffer backing with regex filter |
HistoryPanel | Yes | history_panel.rs:54 | Undo / redo history visualisation | Shows diverging branches |
DecisionCard | No | decision_card.rs:28 | Progressive-disclosure decision UI | Renders a Bayesian evidence ledger inline |
VoiDebugOverlay | Yes | voi_debug_overlay.rs:178 | Visualises Bayesian posteriors, evidence ledgers | Used to audit VOI sampling |
DriftVisualization | Yes | drift_visualization.rs:56 | Per-domain confidence sparklines | Tracks conformal prediction drift over time |
JsonView | No | json_view.rs:29 | Syntax-highlighted JSON tree | Collapsible nodes, incremental render |
ErrorBoundary | Yes | error_boundary.rs:67 | Catches / renders child panics | Isolates failure to a subtree |
ValidationError | Yes | validation_error.rs:77 | Animated inline validation error | Shake + fade in / fade out |
LayoutDebugger | No | layout_debugger.rs:82 | Visualises computed layout decisions | Complements ConstraintOverlay |
Diagnostics | No | diagnostics.rs | Self-check panel | Aggregates doctor-frankentui style checks |
All observability widgets are profiled on observability widgets.
Virtualised and large-scale
Widgets that must render 100k+ items without dying.
| Widget | Stateful? | Source | One-line purpose | Notable trick |
|---|---|---|---|---|
VirtualizedList | Yes | virtualized.rs:45 | O(visible) rendering of huge lists | Fenwick tree + Bayesian height predictor; see virtualized list |
Focus and modal infrastructure
Not widgets in the render sense, but the plumbing every interactive widget relies on.
| Module | Source | Purpose |
|---|---|---|
FocusManager | focus/manager.rs:74 | Tracks current focus, trap stack, Tab / Shift+Tab cycles |
FocusGraph | focus/graph.rs:112 | Directed graph of focusable nodes + spatial edges |
ModalStack | modal/stack.rs:233 | Push / pop modals; backdrop config; animation phases |
HelpIndex | help_index.rs | Searchable index of keybindings |
HelpRegistry | help_registry.rs | Registers per-widget help metadata |
HintRanker | hint_ranker.rs | Ranks hints via Bayesian prior-odds |
Supporting data structures
Not widgets, but shipped in the same crate because widgets depend on them.
| Module | Source | Purpose |
|---|---|---|
Fenwick | fenwick.rs | Binary-indexed tree for O(log n) prefix sums (used by VirtualizedList) |
HeightPredictor | height_predictor.rs | Bayesian predictor with conformal bounds for unmeasured item heights |
AdaptiveRadix | adaptive_radix.rs | Adaptive radix tree for command-palette indexing |
EliasFano | elias_fano.rs | Compressed monotone integer sequences |
LOUDS | louds.rs | Succinct tree encoding for fast navigation |
LogRing | log_ring.rs | Bounded ring buffer for LogViewer |
MeasureCache | measure_cache.rs | Memoised intrinsic-size measurements |
Measurable | measure.rs | Trait for widgets that can report their preferred size |
UndoSupport | undo_support.rs | Generic undo / redo for widgets that opt in |
Drag / KeyboardDrag | drag.rs , keyboard_drag.rs | Pointer + keyboard drag state machines |
Choreography | choreography.rs | Animation sequencing primitives |
Deep-dive pages
The widgets below have dedicated pages because each is genuinely novel:
Bayesian evidence ledger scoring; conformal rank confidence for stability of the top result.
Command paletteFenwick tree + Bayesian height predictor with conformal bounds.
Virtualized listPush / pop semantics, focus trap integration, animation phases.
Modal stackFocus graph, Tab ordering, spatial navigation, trap stack.
Focus managerColumn constraints, row selection, plus the 3.5K-line theming engine.
Table + TableThemeHierarchical data with expand / collapse and lazy loading.
TreeSingle-line and multi-line text entry.
Input + TextareaOSC 8 escape sequences with graceful degradation.
HyperlinksInspector, DebugOverlay, VoiDebug, DriftVisualization, etc.
Observability widgets