gpui-kit GitHub

Components

Breadcrumb builder

A trail of crumbs, collapsed in the middle when it grows too long.

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

use gpui_kit::navigation::Breadcrumb;

Construct

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

Options

Chain onto the value.

crumb(crumb: Crumb) -> Self
crumbs(crumbs: impl IntoIterator<Item = Crumb>) -> Self
max_visible(max_visible: usize) -> Self
on_select(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> Self
on_reveal(handler: impl Fn(Vec<SharedString>, &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/breadcrumb.rs