You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ff-concepts/animations/widget_animations.md
+42-35Lines changed: 42 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,51 +4,58 @@ sidebar_position: 1
4
4
---
5
5
import slideGif from '@site/static/img/animations/animation_gifs/fade.gif';
6
6
import animationsOverview from '@site/static/img/animations/animations_overview.png';
7
-
import shimmerAnimationFinal from '@site/static/img/animations/shimmer_animation_final.gif';
7
+
import shimmerAnimationFinal from '@site/static/img/animations/animation_gifs/shimmerAnimationFinal.gif';
8
+
import fadeEaseIn from '@site/static/img/animations/animation_gifs/fade-easein.gif';
9
+
import fadeEaseInOut from '@site/static/img/animations/animation_gifs/fade-easeinout.gif';
10
+
import fadeEaseOut from '@site//static/img/animations/animation_gifs/fade-easeout.gif';
8
11
9
12
10
13
14
+
## Widget animations overview
15
+
11
16
Widget animations allow you to add animation effects at the widget level.
12
17
To add an animation to a widget, you'll need to go to the property panel for the widget and select the animations tab.
13
18
14
-
<imgsrc={animationsOverview}class="small-image"alt="Animation tab within the property panel is used to add widget animations. Animation trigger specifies when the animation will be run. Widget animations can be triggered when the page (or widget in the case of a delayed load) loaded, or within an action. Animation effect specifies the type of animation to use.Animation curve specifies the function used to interpolate values over time. It controls the speed and style of the animation. Animation properties specifies the properties that can be configured for all widget animations, like whether or not it should loop. Effect-specific properties are properties to specific to the animation effect selected. For example, Fade animations allow you to control the initial opacity and the final opacity. You can customize these values to get the look and feel you desire." />
19
+
<imgsrc={animationsOverview}alt="Animation tab within the property panel is used to add widget animations. Animation trigger specifies when the animation will be run. Widget animations can be triggered when the page (or widget in the case of a delayed load) loaded, or within an action. Animation effect specifies the type of animation to use.Animation curve specifies the function used to interpolate values over time. It controls the speed and style of the animation. Animation properties specifies the properties that can be configured for all widget animations, like whether or not it should loop. Effect-specific properties are properties to specific to the animation effect selected. For example, Fade animations allow you to control the initial opacity and the final opacity. You can customize these values to get the look and feel you desire." />
15
20
16
21
<!-- When you create a widget animation, you'll sepcify:
17
22
18
23
- The animation effect
19
24
- The animation's curve
20
25
- Any variables specific to the animation -->
21
26
22
-
## Types of widget animation effects
23
-
FlutterFlow supports a variety of animation effects.
24
-
25
-
| Animation Effect | Description | Example |
26
-
| ----- | ----- | ----- |
27
-
|**Fade**| Makes the widget gradually appear or disappear | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
28
-
|**Slide**| Changes the widget's position on the screen | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
29
-
|**Scale**| Changes the size of the widget |<imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
30
-
|**Rotate**| Turns the widget clockwise or aniclockwise | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
31
-
|**Shake**| Creates the shake effect on a widget | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
32
-
|**Blur**| Creates a focus or un-focus effect on a widget | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
33
-
|**Saturate**| Creates a color saturation effect on a widget |<imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
34
-
|**Tilt**| Creates a transforming effect (3D perspective) on your widget | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
35
-
|**Flip**| Creates a flip effect on a widget| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
36
-
|**Shimmer**| Creates a shimmer effect on a widget | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
37
-
|**Tint**| Creates a color changing effect on a widget |<imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |
38
-
39
-
## Types of widget animation curves
40
-
When applying an animation, you'll also be able to specify the curve. An animation curve is essentially a mathematical formula used to interoplate values over time. Changing the animation curve allows you to control the speed and style of the animation.
27
+
## Animation effects & properties
28
+
FlutterFlow supports a variety of animation effects and properties for widget animations.
29
+
30
+
Most animations have core properties you can edit, like the `Duration`. which specifies how long the animation should run for, and the `Delay`, which specifies what delay the animation should have before it starts to run.
31
+
32
+
In addition, there are animation-specific properties that usually have both a start and end value, which are mentioned in the table below.
33
+
34
+
| Effect | Description | Example | Effect-Specific properties
35
+
| ----- | ----- | ----- | ----- |
36
+
|**Fade**| Makes the widget gradually appear or disappear. It's widely used for smooth introductions of elements on the screen and to focus user attention by fading in or out content or UI elements.| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|`Opacity`: the starting or ending visibility of the widget, where 0 is fully transparent and 1 is fully visible|
37
+
|**Slide**| Changes the widget's position on the screen. Typically used to introduce widget in a dynamic, visually engaging way, like sliding in menus, pages, or notifications. FlutterFlow supports both vertical and horizontal slide. | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |`Position`: where 0 specifies the widget's current position, -100 specifies 100px to the left (horizontal) or down (vertical), and 100 specifies 100px to the right (horizontal) or up (vertical). <br></br> <br></br> *To make the widget come and go off the screen, make the start and/or final position greater than the width of the device.*|
38
+
|**Scale**| Changes the size of the widget. Often used to draw attention to UI components, like magnifying buttons on hover or animating dialog boxes to appear from a central point. |<imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|`Scale`: the starting or ending multiple to scale the widget horizontally (X) or vertically (Y), where 1 represents the current size of the widget. |
39
+
|**Rotate**| Turns the widget clockwise or aniclockwise. It's often used for simple effects like spinning a loading icon.| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |`Turns`: specifies the number of 360 degree rotations. |
40
+
|**Shake**| Creates the shake effect on a widget. Often used to draw attention to an element or indicate an error, like when a user enters incorrect information in a form field.| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|`Freqeuncy`: Number of shakes per second <br></br> <br></br>`Offset`: Shake distance, a higher value intensifies and a negative value shakes the opposite direction <br></br> <br></br>`Rotation Angle`: Angle of the shake|
41
+
|**Blur**| Creates a focus or un-focus effect on a widget | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |`Radius (X or Y)`: Size of the blur. <br></br><br></br> *To create an unfocus effect, `Final Radius` should be greater than `Initial Radius`. To create a focus effect, `Initial Radius` should be greater than `Final Radius`*. |
42
+
|**Saturate**| Used to enhance visual appeal by making colors more vibrant for focused content or creating a muted effect for background elements. |<imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |`Strength`: 0 indicates fully desaturated, 100 represents normal saturation and >100 represent the percent saturation |
43
+
|**Tilt**| Creates a transforming effect (3D perspective) on your widget | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> | ...|
44
+
|**Flip**| Creates a flip effect on a widget| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> |...|
45
+
|**Shimmer**| Creates a shimmer effect on a widget | <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> | ...|
46
+
|**Tint**| Creates a color changing effect on a widget |<imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" /> | ...|
41
47
42
-
FlutterFlow supports a variety of animation effects
48
+
## Animation curves
49
+
When applying an animation, you'll also be able to specify the curve. An animation curve is essentially a mathematical formula used to interoplate values over time. Changing the animation curve allows you to control the speed and style of the animation.
43
50
44
-
|Animation Curve | Description | Example |
45
-
| ----- | ----- | ----- |
46
-
|**Ease In**|| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
47
-
|**Ease In Out**|| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
48
-
|**Ease Out**|| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
49
-
|**Bounce**|| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
50
-
|**Elastic**|| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
51
-
|**Linear**|| <imgsrc={slideGif}class="xsmall-image"alt="Alt text for your GIF" />|
51
+
| Curve | Description
52
+
| ----- | ----- |
53
+
|**Ease In**|Starts the animation slowly and then accelerates towards the end. It's useful for creating an effect where the motion begins gently and speeds up.|
54
+
|**Ease In Out**|Starts the animation slowly, accelerates in the middle, and then decelerates towards the end. It's ideal for creating smooth, natural-looking animations that don't have abrupt starts or stops.|
55
+
|**Ease Out**|Begins the animation quickly and then slows down towards the end. It gives the effect of a rapid start that gently comes to a stop.|
56
+
|**Bounce**|Adds a bouncing effect at the end of the animation. The animated object overshoots its final position and then bounces back, mimicking the physical behavior of a bouncing ball.|
57
+
|**Elastic**|Creates an elastic effect where the animation overshoots its target value and oscillates before settling. It's useful for animations that need a springy, elastic feel.|
58
+
|**Linear**|Progresses at a constant speed throughout the animation. It provides a uniform transition from start to end, with no acceleration or deceleration.|
52
59
53
60
54
61
## Triggering an animation on page load
@@ -66,11 +73,6 @@ To create an experience like this, we need to:
66
73
2. Add a fade animation to the widget that displays the query result, to gradually present it on the screen.
67
74
68
75
69
-
## Staggering animations on page load
70
-
There are also cases where you may want to stagger widgets loading on a page. In this case you can use the "Apply same duration & delay" property.
71
-
72
-
For example, say you want to have the various elements on your login page
73
-
74
76
75
77
76
78
## Triggering an animation as part of an action flow
@@ -80,5 +82,10 @@ For example, say you want a like button to be enlarged when a user clicks it.
80
82
81
83
82
84
85
+
## Staggering animations
86
+
87
+
88
+
## Widget animations in generated code
89
+
FlutterFlow uses the flutter_animate package in the generated code to apply the animation to the widget.
0 commit comments