gpui-kit GitHub

Components

Radio builder

One option in a set where exactly one can hold.

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

use gpui_kit::controls::Radio;

Construct

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

Options

Chain onto the value.

label(label: impl Into<SharedString>) -> Self
description(description: impl Into<SharedString>) -> Self
on_select(handler: impl Fn(&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