Socket
Socket
Sign inDemoInstall

svelte-number-displayer

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    svelte-number-displayer

Svelte number displayer


Version published
Maintainers
1
Install size
9.75 kB
Created

Readme

Source

svelte-number-displayer

Display animated number easily with Svelte. Check the demo !

Usage

<script>
import Displayer from "svelte-number-displayer";
</script>

<Displayer value={20} timing={40} />

Options

  • value: the end value
  • timing: the duration of the animation
  • defaultValue: the start value (default 0)
  • showTimer: log the time of the animation
  • fnRound: the rounding function
  • easing: the easing function the change the linearity of the animation

Other components

<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} />

License

Licensed under the MIT License - LICENSE

Keywords

FAQs

Last updated on 09 Jun 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc