Skip to content

Examples

# Rich examples out of the box.

Each example is a standalone `cargo` project under `examples/` in the repo. Clone, run, read, fork.

basic no features

## examples/default

A multi-page app with a focusable list, page navigation, and quit. The minimal end-to-end example — the one to read first to understand the architecture.

### What it shows

- ▸ Multi-page routing with `register_page`
- ▸ Focus list with movement (j k)
- ▸ Default keymaps in action
- ▸ Clean `Runtime::run()` loop

Read source
canvas +ratatui

## examples/canvas

A login form with validated inputs, a submit button, and a canvas-owned keymap. Demonstrates the `canvas` feature flag: GUI renderers, suggestions, cursor style, validation, computed fields, textareas, and text inputs.

### What it shows

- ▸ Field-level focus with tab / shift+tab
- ▸ Cursor style + blinking caret from canvas
- ▸ Submit button as a focusable element
- ▸ Validation wiring (sketch in `examples/canvas`)

Read source
dialog +ratatui

## examples/keybindings

A modal showing all keybindings, opened with ?. Demonstrates the built-in `dialog` feature: content and result types, plus a ratatui renderer.

### What it shows

- ▸ Modal lifecycle: open, focus, close
- ▸ Background app dimmed behind the modal
- ▸ Custom keymaps rendered with the `kbd` widget
- ▸ `Dialog::Keybindings` content type

Read source

## Build your own.

The book walks you from `cargo new` to a working multi-page app. Or read the API reference and dive in.

Start the tutorial
All examples on GitLab