@ -764,10 +837,11 @@ A custom transition function can also return a `tick` function, which is called
If a transition returns a function instead of a transition object, the function will be called in the next microtask. This allows multiple transitions to coordinate, making [crossfade effects](tutorial/deferred-transitions) possible.
If a transition returns a function instead of a transition object, the function will be called in the next microtask. This allows multiple transitions to coordinate, making [crossfade effects](tutorial/deferred-transitions) possible.
---
#### Transition events
#### Transition events
---
An element with transitions will dispatch the following events in addition to any standard DOM events:
An element with transitions will dispatch the following events in addition to any standard DOM events:
* `introstart`
* `introstart`
@ -815,9 +889,15 @@ TODO i can't remember how any of this works
@ -333,7 +365,9 @@ The `svelte/motion` module exports two functions, `tweened` and `spring`, for cr
#### `tweened`
#### `tweened`
`store = tweened(value: any, options)`
```js
store = tweened(value: any, options)
```
Tweened stores update their values over a fixed duration. The following options are available:
Tweened stores update their values over a fixed duration. The following options are available:
@ -405,7 +439,9 @@ The `interpolator` option allows you to tween between *any* arbitrary values. It
#### `spring`
#### `spring`
`store = spring(value: any, options)`
```js
store = spring(value: any, options)
```
A `spring` store gradually changes to its target value based on its `stiffness` and `damping` parameters. Whereas `tweened` stores change their values over a fixed duration, `spring` stores change over a duration that is determined by their existing velocity, allowing for more natural-seeming motion in many situations. The following options are available:
A `spring` store gradually changes to its target value based on its `stiffness` and `damping` parameters. Whereas `tweened` stores change their values over a fixed duration, `spring` stores change over a duration that is determined by their existing velocity, allowing for more natural-seeming motion in many situations. The following options are available: