yew-transition-group

Crates.ioyew-transition-group
lib.rsyew-transition-group
version0.0.1
sourcesrc
created_at2022-05-22 10:33:45.823775
updated_at2022-05-22 10:33:45.823775
descriptionSimple, lightweight components to control the transitions of your components, based on react-transition-group
homepagehttps://github.com/boydjohnson/yew-transition-group
repositoryhttps://github.com/boydjohnson/yew-transition-group
max_upload_size
id591107
size10,224
Boyd Johnson (boydjohnson)

documentation

https://docs.rs/yew-transition-group/

README

yew-transition-group

Based off of react-transition-group.

react-transition-group has Transition, CssTransition, and TransitionGroup.

yew-transition-group has only Transition right now. When I get time, TransitionGroup will be implemented. I don't think CssTransition is feasible right now.

Usage

Cargo.toml

[dependencies]
yew-transition-group = "0.0.1"

In view

html !{
<Transition enter={ enter } timeout={ Timeout::new(200) } notification={ notification_callback }>
    <p>{ "Hello World" }</p>
</Transition>

}

Where enter is a boolean, controlling when you want the transition to appear, and notification_callback is a Callback<TransitionState> where you get notified about changes to the TransitionState from Entering -> Entered -> Exiting -> Exited.

Check out the example for more information.

Commit count: 6

cargo fmt