Skip to content

Widget index

Memo holding up a sign with a prompt on it Every widget and component an intuiTUIve app is built from, with the constructor that makes it and the guide section that documents it. Widgets from an off-by-default feature name it: art, micro, viz, files and audio.

Layout and building blocks

Widget Constructor What it is
column column Children stacked top to bottom
row row Children side by side
grid grid Children placed on row and column tracks
layers layers Children drawn over each other
scroll scroll, scroll_x, scroll_both A viewport onto a child laid out at its full size
scroll_virtual scroll_virtual, scroll_virtual_with A scroll view over items that builds only those near the view; loads more near the end; follows its end (follow_end)
split hsplit, vsplit, split Two panes with a divider you can drag
treemap treemap Rectangles sized by weight
switch switch, keyed One child at a time, chosen by a key; the others are kept
each each One child per key, kept by key across reorders
panel .panel(title) A border with a title around any node
rule rule A horizontal line, with an optional title
fill fill An area filled with one glyph
renderable renderable, described Any rich renderable, rebuilt when the signals it read change
component component, repeating A hosted rs-rich-interact component
widget widget Your own widget, through the Widget trait

Text and input

Widget Constructor What it is
text text, text! Console markup that redraws when a signal it reads changes
label label Fixed console markup
fit_text fit_text The longest of several forms of a text that fits
digits digits Large seven-segment digits
big_text big_text FIGlet lettering (art feature)
facts facts, facts_of A description list of keys and values
input input A one-line input bound to a String signal
number_input number_input A number in a range, stepped with keys
text_area text_area Multi-line text editing; a prompt editor (grow, submit_on, complete_at, history)
search_bar search_bar A find bar over a text area's search: the pattern, where it is, regex and case flags
command_line command_line A vim-style command line, with completion and history
calendar calendar A month to pick a date from
month month One month, drawn from a date
year_view year_view A year of months
agenda agenda Events listed by day
time_picker time_picker A time of day, picked field by field
datetime_picker datetime_picker A date and a time together
hex_view hex_view Bytes as hex and text, scrolled

Form controls

Widget Constructor What it is
button button, button_of A button pressed with Enter, Space or a click, in three looks; its label may change
checkbox checkbox, checkbox_tri, checkbox_of A box ticked on and off, bound to a Signal<bool>, or with a mixed third state
switch toggle switch_toggle, switch_of An on/off switch, bound to a Signal<bool>
radio group radio, radio_keyed One choice of several, shown at once; by index or by key
slider slider A number in a range, by keys, click, drag or wheel
select field select_field, select_field_keyed One choice of several, from a menu that opens under it; by index or by key
collapsible collapsible, collapsible_with A titled section that opens and closes; a status beside the title and a summary while closed
spinner spinner, .loading_when An animated busy sign; a node dimmed while it loads

Lists and data

Widget Constructor What it is
list list, list_optional Rows with a cursor
virtual_list virtual_list, list_lazy A list that draws only the rows on screen
list_search list_search Finding in a list as you type
multi_select multi_select Several items picked at once
tree tree, tree_keyed A tree with expanding nodes
tree_lazy tree_lazy A tree whose children load when opened
table table, table_with Rows and columns with a header, sorting and a cell cursor
virtual_table virtual_table A table that draws only the rows on screen
tree table tree_table, tree_table_rows A table whose rows nest, opened and closed by key
source_table source_table, view_of A table whose rows come from a source
cells cells One row of fixed-width cells
scrollbar scrollbar, .scrollbar() A scrollbar beside any scrolled node
log Log::new(..).view() Lines appended at the bottom, kept to a capacity
markdown markdown, MarkdownStream Markdown kept as blocks, which streams in: only the last block renders and draws again; links to Tab to and click
markdown viewer markdown_viewer, MarkdownViewer, files::markdown_loader Documents with a table of contents, links between them, anchors, back and forward
diff view diff_view, diff_view_with Two texts' diff with hunks to move between, fold, and accept or reject
log sources log.targets_view() A log's sources, each with its own level
Widget Constructor What it is
tabs tabs A tab strip over one selected index
tab_set tab_set, tabs_for Tabs you open and close, each with its own state
status_bar status_bar, seg Segments along the bottom line
gauge seg_gauge A status-bar segment drawn as a gauge
breadcrumb breadcrumb A path of parts with separators
key_hints key_hints, key_hints_with The keys that work here, from the bindings
menu_bar menu_bar A bar of menus that drop down
miller miller_of, miller_in Miller columns over any tree
fuzzy_list fuzzy_list, finder_of A list filtered by a fuzzy query as it streams in
preview_of preview_of A pane showing whatever is selected
jobs_panel jobs, jobs_panel Jobs with progress, their state and outcome
transport transport A play head: play, pause and seek

Overlays

Widget Constructor What it is
modal cx.modal A screen over the app that takes the keys
popup cx.popup, cx.popup_at A box placed beside an anchor
prompt cx.prompt A one-line input in a pop-up
pick cx.pick A list in a pop-up, picked with a key
confirm cx.confirm A yes-or-no question
context_menu context_menu, open_menu A menu at the pointer or an anchor
palette cx.palette, cx.palette_of, Provider, SystemCommands, cx.action_palette, action_overlay Every command, the system commands, providers' hits as they arrive, or actions of your own, found by typing, live while open
help cx.help The bindings, listed by section
toast cx.toast A short message that goes away on its own
notify cx.notify A notification with a level and a title
tooltip .tooltip(markup) Text shown while the pointer rests on a node

Charts and media

Widget Constructor What it is
pixels pixels, pixels_fit A pixel buffer drawn with half blocks
stage stage, stage_with Sprites placed over a backdrop, in z order
effect effect A pass over a node's cells after it draws
effect presets fx::fade_in, fx::sweep, …, fx::play Ready effects (fades, dissolve, sweep, slide, glitch, rain, shimmer) that compose and run on cue
placeholder fx::placeholder Pulsing bars shown while content loads
splash fx::splash A cover node that fades into the app
image image, image_with, image_of An image, as half blocks or terminal graphics (art feature)
sprite_sheet sprite_sheet Frames cut from one image, for animation (art feature)
micro_sprite micro_sprite A micro asset as a sprite (micro feature)
sparkline sparkline Values as a line of bars (viz feature)
meter meter A level with a peak hold (viz feature)
bar_spectrum bar_spectrum Bands as vertical bars (viz feature)
spectrogram spectrogram Spectra over time, as colour (viz feature)
persistence persistence Waveforms that fade like phosphor (viz feature)
tuner tuner A pitch reading on a dial (viz feature)

Plugins

Widget Constructor What it is
files-miller files::miller Miller columns over the file system (files feature)
files-list files::file_list A directory's entries as a file manager draws them (files feature)
files-preview files::preview A file's contents: text, code, images, directories (files feature)
files-finder files::finder Files found by a fuzzy query (files feature)
files-crumb files::path_crumb A path as a breadcrumb, home as ~ (files feature)
files-pick files::pick_file A screen to pick a file (files feature)
files-spot files::spot A file's details: size, times, permissions (files feature)
files-tasks files::tasks_panel Copies, moves and deletes in progress (files feature)
audio-picker audio::picker A list of audio devices to pick from (audio feature)