Incular logoIncular
API ReferenceTransitions

SizeTransition

Animated size with child clipping.

SizeTransition animates its own size while clipping the child. size_factor is clamped to 0..1; default axis Vertical.

use incular::prelude::*;

fn main() {
    let app = Application::new(|_cx| {
        SizeTransition::new(0.5, Text::new("Hi"))
                .axis(Axis::Horizontal)
                .axis_alignment(0.0).into()
    })
    .expect("valid application");
    incular::run(app).expect("run application");
}

Props

Prop

Type

Drive size_factor from an AnimationController.

Related: AnimationController.

On this page