{"repo":"vydimitrov/use-count-up","free":true,"listed":false,"github":"https://github.com/vydimitrov/use-count-up","clone":"git clone https://github.com/vydimitrov/use-count-up.git","description":"React/React Native component and hook to animate counting up or down to a number","language":"TypeScript","stars":438,"topics":["react","animate-counting","count-up","react-native","ios","android","countup","react-countup"],"license":"MIT","category":"mobile-apps","readme_excerpt":"use-count-up React/React Native component and hook to animate counting up or down to a number Key features :trophy: Lighter implementation and smaller bundle size in comparison with similar feature solutions :flags: Declarative API (no more imperative calls to start() and update() ) &nbsp;:iphone:&nbsp; React Native support for iOS and Android :deciduous tree: Tree-shakable &nbsp;:file cabinet: Server-side rendering (SSR) compatibility Installation Demo Check the React demo on CodeSandbox and React Native demo on Expo Snack to get started. Component basic usage The CountUp component should be wrapped in a Text component when used in a React Native project like so: Hook basic usage The hook accepts the same properties as the component. The usage for React and React Native is the same. Props The component and the hook accept the same props. They are fully interchangeable. Prop Name Type Default Description ---------------------- ------------------ ------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- isCounting boolean false Play and pause counting animation start number 0 Initial value end number - Target value duration number - Animation duration in seconds. Defaults to 2 seconds if end is set decimalPlaces number - Number of decimal places after the decimal separator. Defaults to the max decimal places count from start and end props ","default_branch":null,"files":null,"tree":[],"storefront":"/r/vydimitrov","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vydimitrov/use-count-up/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}