# Fade, slide and zoom entrance animations

> Fade and slide elements in on scroll from the top, right, bottom or left, or zoom, rotate and blur them in with a start state of the from option.

The [`from`](/reference/options/#from) option sets the start state of the entrance. The element animates from this state to no offset, no rotation, no blur, a scale of 1 and an opacity of 1.

## Slide in from a side

Set `from` to `"top"`, `"right"`, `"bottom"` or `"left"`. The element starts transparent and 24 pixels away from its resting position, on that side. The default is `"bottom"`, so the element moves up.

The distance is always 24 pixels. For a different distance, set a start state.

## Zoom, rotate and blur with a start state

Set `from` to an object. The object can have these properties:

| Property  | Type               | A number is in |
| --------- | ------------------ | -------------- |
| `opacity` | `number`           |                |
| `x`       | `number \| string` | pixels         |
| `y`       | `number \| string` | pixels         |
| `scale`   | `number`           |                |
| `rotate`  | `number \| string` | degrees        |
| `blur`    | `number \| string` | pixels         |

A string contains a CSS value with its unit, for example `"-100%"` or `"-5deg"`.

The object sets the complete start state. Only the properties that you set animate. For example, `{ scale: 0.9 }` scales the element with no fade. To add a fade, also set `opacity: 0`.

These start states give common entrances:

| Entrance                   | `from`                          |
| -------------------------- | ------------------------------- |
| Fade only                  | `{ opacity: 0 }`                |
| Zoom in                    | `{ opacity: 0, scale: 0.8 }`    |
| Slide in from far away     | `{ opacity: 0, y: 80 }`         |
| Slide in by its full width | `{ opacity: 0, x: "-100%" }`    |
| Slide in diagonally        | `{ opacity: 0, x: -24, y: 24 }` |
| Rotate in                  | `{ opacity: 0, rotate: -8 }`    |
| Blur in                    | `{ opacity: 0, blur: 8 }`       |

## The easing

The entrance uses the easing [`cubic-bezier(0.22, 1, 0.36, 1)`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/easing-function/cubic-bezier). The `from` option cannot change it. For a different easing, [use your own keyframes](/guides/keyframes/#set-the-easing).

## Things to know

* **The element’s own values do not apply during the entrance.** The entrance animates the CSS properties `translate`, `scale`, `rotate`, `filter` and `opacity`, but only the properties that the start state sets. While the entrance plays, the element’s own values of these properties do not apply. In the JavaScript API, they also do not apply while the element waits. The element’s own `transform` property applies. To keep an own value, such as `rotate: 3deg`, put it on an inner element, or use the [`keyframes`](/guides/keyframes/#keep-the-elements-own-values) option.
* **In the JavaScript API, a start state without `opacity: 0` changes the element before it enters.** With `opacity: 0` and a movement, the element waits at its resting position. Other start states wait at the start state. For example, with `{ y: 80 }`, the element waits 80 pixels lower, so [`reveal()` reveals it later](/guides/timing/#the-start-state-moves-the-box-of-reveal). React, Vue and Astro hide a waiting element at its resting position.
* **A start state with `blur` [runs on the main thread](/guides/keyframes/#animate-the-properties-that-the-compositor-runs) in Chromium.** The full entrance runs there, not only the blur, so it can stutter when the main thread is busy. On pages that must stay smooth, use a start state without `blur`.
