gpui-kit GitHub

Components

AnimatedNumber builder

A numeric readout that animates between values.

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

use gpui_kit::display::AnimatedNumber;

Construct

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

Options

Chain onto the value.

format(format: impl Fn(f64) -> String + 'static) -> Self
spec(spec: MotionSpec) -> Self
type_scale(scale: TypeScale) -> 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/display/animated_number.rs