gpui-kit GitHub

Components

Collapsible builder

A single region behind a header that opens and shuts it.

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

use gpui_kit::navigation::Collapsible;

Construct

new(ident: impl Into<Ident>, title: impl Into<SharedString>) -> Self
header_id(ident: &Ident) -> SharedString

Options

Chain onto the value.

description(description: impl Into<SharedString>) -> Self
open(open: bool) -> Self
disabled(disabled: bool) -> Self
body(body: impl IntoElement) -> Self
on_toggle(handler: impl Fn(bool, &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/collapsible.rs