Skip to content

Commit

Permalink
flesh out in/out transition tutorial chapter (#2792)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed May 26, 2019
1 parent 0891495 commit 0d7f6fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion site/content/tutorial/10-transitions/03-in-and-out/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
title: In and out
---

Instead of the `transition` directive, an element can have an `in` or an `out` directive, or both together:
Instead of the `transition` directive, an element can have an `in` or an `out` directive, or both together. Import `fade` alongside `fly`...

```js
import { fade, fly } from 'svelte/transition';
```

...then replace the `transition` directive with separate `in` and `out` directives:

```html
<p in:fly="{{ y: 200, duration: 2000 }}" out:fade>
Expand Down

0 comments on commit 0d7f6fb

Please sign in to comment.