GPUI Box GitHub

Components

ScrollFade builder

A region whose content fades towards the edges it is scrolled past.

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

use gpui_kit::layout::ScrollFade;

Construct

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

Options

Chain onto the value.

edges(edges: FadeEdges) -> Self
top(fade: bool) -> Self
bottom(fade: bool) -> Self
left(fade: bool) -> Self
right(fade: bool) -> Self
band(band: f32) -> Self
fit_height() -> Self
child(child: impl IntoElement) -> 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/layout/scroll_fade.rs