gpui-kit GitHub

Components

BrowserPanel builder

A framed web view: address, controls, and the rectangle a page goes in.

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

use gpui_kit::content::BrowserPanel;

Construct

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

Options

Chain onto the value.

url(url: impl Into<SharedString>) -> Self
state(state: ViewportState) -> Self
viewport(viewport: impl IntoElement) -> Self
on_back(handler: impl Fn(&mut Window, &mut App) + 'static) -> Self
on_forward(handler: impl Fn(&mut Window, &mut App) + 'static) -> Self
on_reload(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/content/browser.rs