Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-countup

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-countup

This Svelte component counts up from an initial number to a target number.

  • 0.2.7
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
increased by80.11%
Maintainers
1
Weekly downloads
 
Created
Source

Svelte CountUp

This Svelte component counts up from an initial number to a target number.

Demo

https://svelte.dev/repl/e38ffac8831d44128a127b5dfe114f6f?version=3.46.4

Features

  • You can specify the initial number, target number, and the duration of the count up
  • You can specify the number of decimal places
  • You can choose the target number to be rounded or not
  • You can set the step size of the count up
  • You can use multiple count ups on the same page
  • Countup only starts when it is visible on the screen and stops when it is not visible

Install

npm i svelte-countup

Usage

import Countup from "svelte-countup";
<Countup value={100} />

Props

All props (with default values):

<Countup
  initial={0}
  value={100}
  duration={3000}
  step={1}
  roundto={1}
  format={true}
/>
  • initial: The initial number to count up from.
  • value: The target number to count up to.
  • duration: The duration of the animation in milliseconds.
  • step: The number of steps to count up by.
  • roundto: The number of decimal places to round to.
  • format: Whether to separate thousands with commas.

FAQs

Package last updated on 20 May 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc