gpui-kit GitHub

Components

FormField builder

A labelled control, with the secondary text a typist needs around it.

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

use gpui_kit::controls::FormField;

Construct

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

Options

Chain onto the value.

control(control: impl Into<SharedString>) -> Self
description(description: impl Into<SharedString>) -> Self
error(error: impl Into<SharedString>) -> Self
hint(keystroke: impl Into<SharedString>) -> Self
required(required: bool) -> Self

Queries

Only answer; they change nothing.

is_invalid() -> bool

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/form_field.rs