# transition

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/prelude/animation/function-transition/

**function** · [`ferroui-view`](/docs/0.5.0/api/ferroui-view/) · v0.5.0

```rust
fn transition<P>(property: &'static P, duration: std::time::Duration) -> std::rc::Rc<dyn ITransition>
where P: TypedProperty + ?Sized,
      <P as >::Value: Transitionable
```

A transition of `property` that takes `duration`: when the property
changes, the control moves to the new value over that time
(`transitions: transitions([transition(Visual::opacity_property(), ms(200))])`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L60)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
