Skip to main content
The Pantry is configured through a single pantry.toml file at your widget crate root.

Full example

[config]

[colors.*]

Each [colors.<family>] table becomes a group in the Styles tab. Two key formats are supported: Named keys (snake_case) render as individual swatches with a colored block, display name, and hex value:
Named color swatches Numeric keys render as a horizontal scale strip showing the gradient across values:
Scale strip rendering

[typography]

Each key renders sample text in its specified color with the description alongside. Color values accept hex ("#FFFFFF") or named ratatui colors ("DarkGray").
Colors and typography entries auto-generate into the Styles tab with no ingredient code required. The style_source value from [config] sets the breadcrumb module path for these generated ingredients.

[ingredients]

Declares ingredient modules for compile-time discovery via the pantry_ingredients!() proc macro.
For aggregating ingredients from multiple crates, use array-of-tables syntax:
The [ingredients] section is only needed when using the proc macro. For manual aggregation, omit it and pass ingredients directly to tui_pantry::run!(). See Writing Ingredients for details.