gpui-kit GitHub

Components

Checkbox builder

A box that reports one of on, off, or partly on.

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

use gpui_kit::controls::Checkbox;

Construct

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

Options

Chain onto the value.

label(label: impl Into<SharedString>) -> Self
description(description: impl Into<SharedString>) -> Self
checked(checked: bool) -> Self
mixed() -> Self
on_change(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/controls/toggle.rs