# FramerMotionAnimations

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-behaviors-animations/struct-framermotionanimations/

**struct** · [`ferroui-xaml-behaviors-animations`](/docs/0.5.0/api/ferroui-xaml-behaviors-animations/) · v0.5.0

```rust
struct FramerMotionAnimations
```

Provides composition animations inspired by popular Framer Motion presets.

Every `set_*` function animates `element`, the control to animate, over `milliseconds`, the
animation duration expressed in milliseconds, when the control is loaded.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L14)

## Members

- [`set_fade_in`](#function-set_fade_in)
- [`set_fade_in_up`](#function-set_fade_in_up)
- [`set_fade_in_down`](#function-set_fade_in_down)
- [`set_fade_in_left`](#function-set_fade_in_left)
- [`set_fade_in_right`](#function-set_fade_in_right)
- [`set_slide_in_from_left`](#function-set_slide_in_from_left)
- [`set_slide_in_from_right`](#function-set_slide_in_from_right)
- [`set_slide_in_from_top`](#function-set_slide_in_from_top)
- [`set_slide_in_from_bottom`](#function-set_slide_in_from_bottom)
- [`set_pop_in`](#function-set_pop_in)
- [`set_pop_out`](#function-set_pop_out)
- [`set_spring_in`](#function-set_spring_in)
- [`set_spring_out`](#function-set_spring_out)
- [`set_rotate_in`](#function-set_rotate_in)
- [`set_rotate_out`](#function-set_rotate_out)
- [`set_scale_in`](#function-set_scale_in)
- [`set_scale_out`](#function-set_scale_out)

<a id="function-set_fade_in"></a>

### set_fade_in

```rust
fn set_fade_in(element: &Control, milliseconds: f64)
```

Fades the control in using an opacity animation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L18)

<a id="function-set_fade_in_up"></a>

### set_fade_in_up

```rust
fn set_fade_in_up(element: &Control, milliseconds: f64)
```

Fades the control in while translating it upward.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L23)

<a id="function-set_fade_in_down"></a>

### set_fade_in_down

```rust
fn set_fade_in_down(element: &Control, milliseconds: f64)
```

Fades the control in while translating it downward.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L28)

<a id="function-set_fade_in_left"></a>

### set_fade_in_left

```rust
fn set_fade_in_left(element: &Control, milliseconds: f64)
```

Fades the control in while translating it from the left.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L33)

<a id="function-set_fade_in_right"></a>

### set_fade_in_right

```rust
fn set_fade_in_right(element: &Control, milliseconds: f64)
```

Fades the control in while translating it from the right.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L38)

<a id="function-set_slide_in_from_left"></a>

### set_slide_in_from_left

```rust
fn set_slide_in_from_left(element: &Control, milliseconds: f64)
```

Slides the control in from the left.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L43)

<a id="function-set_slide_in_from_right"></a>

### set_slide_in_from_right

```rust
fn set_slide_in_from_right(element: &Control, milliseconds: f64)
```

Slides the control in from the right.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L48)

<a id="function-set_slide_in_from_top"></a>

### set_slide_in_from_top

```rust
fn set_slide_in_from_top(element: &Control, milliseconds: f64)
```

Slides the control in from the top.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L53)

<a id="function-set_slide_in_from_bottom"></a>

### set_slide_in_from_bottom

```rust
fn set_slide_in_from_bottom(element: &Control, milliseconds: f64)
```

Slides the control in from the bottom.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L58)

<a id="function-set_pop_in"></a>

### set_pop_in

```rust
fn set_pop_in(element: &Control, milliseconds: f64)
```

Runs a pop-in scale animation centered on the control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L63)

<a id="function-set_pop_out"></a>

### set_pop_out

```rust
fn set_pop_out(element: &Control, milliseconds: f64)
```

Runs a pop-out scale animation centered on the control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L68)

<a id="function-set_spring_in"></a>

### set_spring_in

```rust
fn set_spring_in(element: &Control, milliseconds: f64)
```

Runs a vertical spring-in animation similar to Framer Motion's preset.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L73)

<a id="function-set_spring_out"></a>

### set_spring_out

```rust
fn set_spring_out(element: &Control, milliseconds: f64)
```

Runs a vertical spring-out animation similar to Framer Motion's preset.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L78)

<a id="function-set_rotate_in"></a>

### set_rotate_in

```rust
fn set_rotate_in(element: &Control, milliseconds: f64)
```

Rotates the control into view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L83)

<a id="function-set_rotate_out"></a>

### set_rotate_out

```rust
fn set_rotate_out(element: &Control, milliseconds: f64)
```

Rotates the control out of view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L88)

<a id="function-set_scale_in"></a>

### set_scale_in

```rust
fn set_scale_in(element: &Control, milliseconds: f64)
```

Scales the control up into view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L93)

<a id="function-set_scale_out"></a>

### set_scale_out

```rust
fn set_scale_out(element: &Control, milliseconds: f64)
```

Scales the control down out of view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Behaviors.Animations/composition/framer_motion_animations.rs#L98)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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