GPUI Box GitHub

Components

AnchorList builder

A horizontal reading-order list of links to sections in the current page.

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

use gpui_kit::navigation::AnchorList;

Construct

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

Options

Chain onto the value.

anchor(anchor: Anchor) -> Self
anchors(anchors: impl IntoIterator<Item = Anchor>) -> Self
active(id: impl Into<SharedString>) -> Self
on_navigate(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> Self
overflow_after(count: usize) -> Self
overflow_menu(menu: Entity<Menu>) -> 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/anchor_list.rs