Display animated number easily with Svelte.
- https://its-just-nans.github.io/svelte-number-displayer - demo
- https://www.npmjs.com/package/svelte-number-displayer - npm
- https://github.com/Its-Just-Nans/svelte-number-displayer - repo
<script>
import Displayer from "svelte-number-displayer";
</script>
<Displayer value={20} timing={40} />value: the end valuetiming: the duration of the animationdefaultValue: the start value (default0)showTimer: log the time of the animationfnRound: the rounding functioneasing: the easing function the change the linearity of the animation
<script>
import { DisplayerTweened } from "svelte-number-displayer";
import Displayer from "svelte-number-displayer";
</script>
<!-- it use the requestAnimationFrame function -->
<Displayer value={20} timing={40} />
<!-- it use the svelte tweened function -->
<DisplayerTweened value={20} timing={40} />Licensed under the MIT License - LICENSE