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

Full example

[config]
theme = "light"
style_source = "my_crate::styles"

[colors.brand]
deep_purple = "#2E1574"
white = "#FFFFFF"

[colors.green]
100 = "#DCFCE7"
500 = "#22C55E"
900 = "#14532D"

[typography]
text = { color = "#FFFFFF", description = "Primary content" }
text_dim = { color = "DarkGray", description = "Secondary labels" }

[ingredients]
source = "my_crate"
modules = ["widgets::gauge", "widgets::table"]

[config]

KeyDefaultDescription
theme"dark"Chrome palette: "dark" (Catppuccin Mocha) or "light" (Catppuccin Latte). Toggle at runtime with t.
style_sourcenoneModule path prefix for auto-generated Styles tab ingredients (e.g., "my_crate::styles").

[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:
[colors.brand]
deep_purple = "#2E1574"
white = "#FFFFFF"
Named color swatches Numeric keys render as a horizontal scale strip showing the gradient across values:
[colors.green]
100 = "#DCFCE7"
500 = "#22C55E"
900 = "#14532D"
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").
[typography]
text = { color = "#FFFFFF", description = "Primary content" }
text_dim = { color = "DarkGray", description = "Secondary labels" }
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.
KeyDescription
sourceCrate name used as the module path prefix.
modulesList of module paths. Each expands to {source}::{module}::ingredient::ingredients().
[ingredients]
source = "my_crate"
modules = [
    "widgets::gauge",
    "widgets::node_table",
]
For aggregating ingredients from multiple crates, use array-of-tables syntax:
[[ingredients]]
source = "crate_a"
modules = ["widgets::foo"]

[[ingredients]]
source = "crate_b"
modules = ["widgets::bar"]
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.