Function freya::components::GlobalAnimatedPosition
source · pub fn GlobalAnimatedPosition<T>(
__props: GlobalAnimatedPositionProps<T>,
) -> Option<VNode>
Expand description
Animate an element position across time and space.
For that, the element must have an unique ID.
It must also be descendant of a [GlobalAnimatedPositionProvider].
§Example
fn app() -> Element {
rsx!(
GlobalAnimatedPositionProvider::<i32> {
GlobalAnimatedPosition {
id: 0,
width: "100",
height: "25",
label {
"Click this"
}
}
}
)
}
§Props
For details, see the props struct definition.