gpui-kit GitHub

Components

Wizard builder

A multi-step flow: the steps, the current step's body, and the way on.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::navigation::Wizard;

Construct

new(ident: impl Into<Ident>) -> Self

Options

Chain onto the value.

step(step: WizardStep) -> Self
steps(steps: impl IntoIterator<Item = WizardStep>) -> Self
layout(layout: WizardLayout) -> Self
vertical() -> Self
body(body: impl IntoElement) -> Self
back_to(step: impl Into<SharedString>) -> Self
finish(finish: bool) -> Self
can_advance(can_advance: bool) -> Self
back_label(label: impl Into<SharedString>) -> Self
next_label(label: impl Into<SharedString>) -> Self
finish_label(label: impl Into<SharedString>) -> Self
on_navigate(handler: impl Fn(&WizardIntent, &mut Window, &mut App) + 'static) -> Self

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/navigation/wizard.rs