2023-03-04 09:07:26 +08:00
---
layout: docs
title: Animations
2023-04-11 23:13:26 +08:00
description: Use these helpers for quickly configuring the animation direction of an element.
2023-03-04 09:07:26 +08:00
group: helpers
aliases: "/docs/5.3/helpers/"
---
2023-04-11 23:13:26 +08:00
## animation-direction-normal
Sets the animation direction to "normal", which plays the animation forwards (default).
```html
< div class = "animation-direction-normal" > ...< / div >
2023-03-04 09:07:26 +08:00
```
2023-04-11 23:13:26 +08:00
## animation-direction-reverse
Sets the animation direction to "reverse", which plays the animation backwards.
```html
< div class = "animation-direction-reverse" > ...< / div >
```
## animation-direction-alternate
- `.animation-direction-alternate` : Sets the animation direction to "alternate", which plays the animation forwards and backwards alternately.
```html
< div class = "animation-direction-alternate" > ...< / div >
```
## animation-direction-alternate-reverse
- `.animation-direction-alternate-reverse` : Sets the animation direction to "alternate-reverse", which plays the animation backwards and forwards alternately.
```html
< div class = "animation-direction-alternate-reverse" > ...< / div >
```
2023-03-04 09:07:26 +08:00
2023-04-11 23:13:26 +08:00
## Example:
2023-03-04 09:07:26 +08:00
2023-04-11 23:13:26 +08:00
The following example shows how the class `animation-direction-alternate` was used to alternate the animation direction of a spinner-border.
2023-03-04 09:07:26 +08:00
{{< example > }}
2023-04-11 23:13:26 +08:00
< div class = "spinner-border text-primary animation-direction-alternate" role = "status" >
2023-03-04 09:07:26 +08:00
< span class = "visually-hidden" > Loading...< / span >
< / div >
{{< / example > }}