gpui-kit GitHub

Components

InlineEdit builder

Text that a click or enter turns into a field.

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

use gpui_kit::controls::InlineEdit;

Construct

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

Options

Chain onto the value.

placeholder(placeholder: impl Into<SharedString>) -> Self
editing(editing: bool) -> Self
multiline(multiline: bool) -> Self
rows(rows: usize) -> Self
failure(failure: impl Into<SharedString>) -> Self
on_edit(handler: impl Fn(&mut Window, &mut App) + 'static) -> Self
on_commit(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> Self
on_cancel(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/inline_edit.rs