diff --git a/site/content/guide/09-transitions.md b/site/content/guide/09-transitions.md index 2a51fcaa47..e355bed7cc 100644 --- a/site/content/guide/09-transitions.md +++ b/site/content/guide/09-transitions.md @@ -3,14 +3,12 @@ title: Transitions --- -### Transitions - Transitions allow elements to enter and leave the DOM gracefully, rather than suddenly appearing and disappearing. ```html @@ -21,12 +19,12 @@ Transitions allow elements to enter and leave the DOM gracefully, rather than su {/if} ``` -Transitions can have parameters — typically `delay` and `duration`, but often others, depending on the transition in question. For example, here's the `fly` transition from the [svelte-transitions](https://github.com/sveltejs/svelte-transitions) package: +Transitions can have parameters — typically `delay` and `duration`, but often others, depending on the transition in question. For example, here's the `fly` transition: ```html @@ -37,6 +35,9 @@ Transitions can have parameters — typically `delay` and `duration`, but often {/if} ``` + +### In and out + An element can have separate `in` and `out` transitions: ```html @@ -53,7 +54,27 @@ An element can have separate `in` and `out` transitions: {/if} ``` -Transitions are simple functions that take a `node` and any provided `parameters` and return an object with the following properties: + +### Built-in transitions + +Svelte comes with a handful of ready-to-use transitions: + +```html + + +``` + + +### Custom transitions + +You can also make your own. Transitions are simple functions that take a `node` and any provided `parameters` and return an object with the following properties: * `duration` — how long the transition takes in milliseconds * `delay` — milliseconds before the transition starts diff --git a/site/src/components/InlineSvg.html b/site/src/components/InlineSvg.html index e4dc0e232f..9b4c2e3ddb 100644 --- a/site/src/components/InlineSvg.html +++ b/site/src/components/InlineSvg.html @@ -104,37 +104,8 @@ - - - - - - - + + + \ No newline at end of file diff --git a/site/src/routes/guide/_GuideContents.html b/site/src/routes/guide/_GuideContents.html index b19542acf0..d320ff4b93 100644 --- a/site/src/routes/guide/_GuideContents.html +++ b/site/src/routes/guide/_GuideContents.html @@ -1,5 +1,5 @@ -