gpui-kit GitHub

Components

SettingsRow builder

One setting: what it is called on the left, what it is set to on the right.

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

use gpui_kit::controls::SettingsRow;

Construct

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

Options

Chain onto the value.

description(description: impl Into<SharedString>) -> Self
badge(badge: impl Into<SharedString>) -> Self
value(value: impl Into<SharedString>) -> Self
control(control: impl IntoElement) -> Self
managed(controller: impl Into<SharedString>) -> 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/controls/settings_row.rs