Skip to content

Commit 0d7f6fb

Browse files
committed
flesh out in/out transition tutorial chapter (#2792)
1 parent 0891495 commit 0d7f6fb

File tree

1 file changed

+7
-1
lines changed
  • site/content/tutorial/10-transitions/03-in-and-out

1 file changed

+7
-1
lines changed

site/content/tutorial/10-transitions/03-in-and-out/text.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
title: In and out
33
---
44

5-
Instead of the `transition` directive, an element can have an `in` or an `out` directive, or both together:
5+
Instead of the `transition` directive, an element can have an `in` or an `out` directive, or both together. Import `fade` alongside `fly`...
6+
7+
```js
8+
import { fade, fly } from 'svelte/transition';
9+
```
10+
11+
...then replace the `transition` directive with separate `in` and `out` directives:
612

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

0 commit comments

Comments
 (0)