Skip to main content

Prerequisites

  • Rust toolchain (stable)
  • A crate with ratatui widgets

Install

This adds the cargo pantry subcommand to your toolchain.

Initialize

From your widget crate root:
This does four things:
  1. Adds tui-pantry as an optional dependency (cargo add tui-pantry --optional)
  2. Creates pantry.toml with default config
  3. Scaffolds examples/widget_preview/ with sample Widgets, Panes, and Views ingredients
  4. Prints next steps for wiring your own widgets
The scaffold compiles and runs immediately. No additional setup required.

Launch

You should see the Pantry open with sample ingredients across three tabs. Navigate with j/k or arrow keys, switch tabs with 1 to 4, and press q to quit. TUI Pantry Widgets tab From here, explore the sample ingredients, then replace them with previews of your own widgets. See Writing Ingredients for how to define them.

Workspace usage

In a multi-crate workspace, target a specific package: