Skip to content

Example Catalog

All examples live in examples/ and can be run with:

bash
cargo run --example <name>

Web/WASM examples live under examples/web/ and are standalone crates:

  • examples/web/hello
  • examples/web/search_palette

Feature-gated examples require --features:

bash
cargo run --example image --features image
cargo run --example markdown_editor_sync --features markdown,syntax-syntect

Getting Started

ExampleDescription
todoClassic todo app: text input, add, toggle, scroll, delete confirmation
dashboardMulti-panel dashboard: Grid, Sparkline, StatusBar, Badge
formsForm patterns: Radio, Select, ComboBox, Slider, DatePicker
form_validationLogin-style validation: Validator, Input::error(...), Enter-to-submit
mockupDashboard-style layout prototyping with mockup! (no Component code)
lazygitLazygit-style multi-panel layout with focus hints and number-key switching
showcaseBroad demo: tabs, accordion, fuzzy palette, context menu, tree, toast, tooltip
whack_a_moleWhack-a-mole arcade (terminal); same layout and rules as the WASM showcase tab

Layout & Containers

ExampleDescription
length_percentLength::Percent for horizontal and vertical sizing
frame_hubFrame demos hub: border merge, decorations, and divider/tab features
splitterSplitter classic vs frame-join modes with resizable panes
modal_auto_heightModal + List with Auto vs max_height constraints
modal_percent_reproModal height percent and OverlayScope behavior
mouse_region_clickMouseRegion: passthrough vs capturing button/region clicks

Input Widgets

ExampleDescription
inputsSingle-line and multi-line inputs: username, password, search, bio
drag_drop_kanbanGeneric DragSource / DropTarget kanban board with preview and cancel
text_areaTextArea editor paired with read-only viewer: scroll, selection, line numbers
text_area_sentinelsTextArea sentinels: @ file picker tokens, stash/restore snapshots
multi_selectMultiSelect: space toggle, enter commit
hex_areaHexArea: binary editing, cursor, selection, scroll

Data Widgets

ExampleDescription
tableTable: header, rows, selection, scroll + inspector preset (tabs, sections, key/value, disclosure)
list_headersList with section headers and spacers
log_viewerLogView over a sample file: filter, follow, pause, level coloring

Tabs & Navigation

ExampleDescription
tabs_hubTabs demos hub: TabVariant styles + draggable tab bar behaviors
pagination_composedComposed pagination controls with page-size dropdown

Search & Overlays

ExampleDescription
search_palette_hubSearchPalette hub: uncontrolled, controlled, delete-confirm, description placement, popover overlays
command_paletteCommandPalette + command registry demo: open with p, app and child commands
search_listsGlobal / search plus per-panel filters over files, branches, tasks

Display & Visualization

ExampleDescription
ascii_canvas_ghostASCII ghost animation using AsciiCanvas with frame sequences
ascii_canvas_scrollAsciiCanvas inside ScrollView: row-skip clipping and gradient rendering
animated_showcaseAnimated opacity + height transitions with easing/duration controls
animated_sequential_swapSequential fade between subtrees via on_opacity_transition_end (fg+bg, fg-only, framed)
chart_showcaseChart with multiple series, thresholds, axes, legend, grid
sparkline_showcaseAnimated Sparkline samples (CPU-like usage, download/upload)
heatmapHeatmap-style grid with color gradients
progress_zonesSeveral ProgressBar styles/zones (CPU, memory, disk, network)
visual_effectsEffectScope post-processing: monochrome, palettes, scanlines, rainbow, CRT presets

Styling & Themes

ExampleDescription
theme_showcaseThemeProvider and switchable built-in themes
color_contrastAutomatic text readability on varied backgrounds
gradient_widgetsGradient-themed ProgressBar, Slider, Table, SearchPalette
hoverHover styles across interactive widgets

Inline Mode

ExampleDescription
inlineInline viewport: draft input and ctx.append_transcript_lines rich log lines
native_scroll_chatClaude Code / Gemini CLI style transcript using ctx.append_transcript_element + native scrollback
inline_choicesInline theme/target pickers and apply-to-insert summary
inline_list_pickerInline list picker over command list

ScrollView

ExampleDescription
scroll_view_scroll_to_keyScrollView + scroll_to_key: search jumps to matching message
scroll_view_stressStress: many Frame + DocumentView children (FPS)
scroll_view_opencode_reproOpencode-like session: sidebar, timeline, search/theme overlays

Diagnostics & Stress Tests

ExampleDescription
diagnosticsRender/mouse diagnostics hub: active, idle, and tabbed behavior metrics
stress_testLarge list + text field + optional FPS overlay
widget_galleryBuilt-in widgets: checkboxes, progress bars, spinners, sliders
widgetsFilterable demo: tabs, list, table, scroll, border toggles
auto_height_testTextArea + DocumentView with Length::Auto height behavior

Feature-Gated Examples

big-text

ExampleDescription
big_textBigText: FIGlet fonts, horizontal/vertical/rainbow gradients
figlet_editorFIGlet editor: per-character glyphs, font selection, import/export
bash
cargo run --example big_text --features big-text
cargo run --example figlet_editor --features big-text

diff-view

ExampleDescription
diff_hubDiffView hub: before/after compare and patch-based unified/split modes
bash
cargo run --example diff_hub --features diff-view

image

ExampleDescription
imageImage widget: procedural PNG, GIF, playback controls
image_modesTextArea inline image sentinels vs attachment mode
messengerChat UI with plain/rich messages and optional images
bash
cargo run --example image --features image
cargo run --example image_modes --features image
cargo run --example messenger --features image

markdown

ExampleDescription
markdown_hubMarkdown hub: preview, table rendering options, and hyperlink handling
scroll_view_stressStress: Frame + DocumentView children in ScrollView
scroll_view_opencode_reproOpencode-like session with sidebar and overlays
bash
cargo run --example markdown_hub --features markdown

markdown + syntax-syntect

ExampleDescription
markdown_editor_syncLive markdown editor + preview with bidirectional scroll sync
bash
cargo run --example markdown_editor_sync --features markdown,syntax-syntect

syntax-syntect

ExampleDescription
syntax_theme_compareSide-by-side syntax highlighting themes
bash
cargo run --example syntax_theme_compare --features syntax-syntect

terminal

ExampleDescription
terminal_filetree_devtoolsFileTree + ManagedTerminal devtools split
bash
cargo run --example terminal_filetree_devtools --features terminal

devtools

ExampleDescription
devtoolsMinimal app that emits periodic debug_log! lines for the DevTools logs tab
bash
cargo run --example devtools --features devtools

MIT OR Apache-2.0