New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-animated-numbers

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-animated-numbers

Module that shows number changes through simple animation

latest
Source
npmnpm
Version
0.6.3
Version published
Weekly downloads
4.1K
-7.52%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-animated-numbers

PRs Welcome Platform License

npm version

Library showing animation of number changes in react-native

If you want web version in react.js download react-animated-numbers

install

yarn add react-native-animated-numbers

props

typedefaultdescription
animateToNumbernumbernoneNumber to be animated
fontStyleTextStyle?noneStyle of number text
animationDurationnumber?1400(ms)The speed at which the animation works
includeCommaboolean?falseWhether the number contains commas
easingEasing?Easing.elastic(1.2)React Native Easing API in Animated
containerStyleViewStyle?noneStyle of container view
fontVariantstring[]['tabular-nums']Font variants for a font
localeIntl.LocalesArgument'en-US'the locale to be used to split the number when includeComma is true

example

import React from 'react';
import { SafeAreaView, Button } from 'react-native';
import AnimatedNumbers from 'react-native-animated-numbers';

const App = () => {
  const [animateToNumber, setAnimateToNumber] = React.useState(7979);

  const increase = () => {
    setAnimateToNumber(animateToNumber + 1999);
  };

  return (
    <SafeAreaView
      style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}
    >
      <AnimatedNumbers
        includeComma
        animateToNumber={animateToNumber}
        fontStyle={{ fontSize: 50, fontWeight: 'bold' }}
      />
      <Button title="increase" onPress={increase} />
    </SafeAreaView>
  );
};
export default App;

screenshot

Keywords

react-native

FAQs

Package last updated on 15 Nov 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