npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-simple-animations

v0.3.1

Published

A React Native component that adds simple entrance, exit, and attention-seeking animations to a child component.

Downloads

607

Readme

npm license GitHub issues npm downloads code style: prettier tested with jest Dependency status devDependency status

react-native-simple-animations React Native Simple Animations

A React Native component that adds simple entrance, exit, and attention-seeking animations to a child component. Works on iOS & Android.

Example

react-native-simple-animations

Installation

npm install react-native-simple-animations --save

Usage

Import SimpleAnimation component:

import { SimpleAnimation } from 'react-native-simple-animations';

Use as follows:

<SimpleAnimation delay={500} duration={1000} fade staticType='zoom'>
	<Text>Hello, world!</Text>
</SimpleAnimation>

In the above example the Text component will fade and zoom in for 1000 milliseconds after waiting 500 milliseconds.

Configuration

You can configure SimpleAnimation by passing the following props:

| prop | type/valid values | default | description | | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | aim | "in", "out" | "in" | whether the child component will animate in or out; for example, if staticType is set to "zoom" and aim is set to "in" the child component will zoom in; if aim is set to "out" the child component will zoom out | | animate | boolean | true | when true the child component will animate, when false the child component will not animate | | animateOnUpdate | boolean | false | when true the child component will animate if any of the props change on it's parent SimpleAnimation component, when false the child component will not animate regardless of SimpleAnimation's props change | | delay | number | 0 | the length in milliseconds the component will wait before animating | | direction | "down", "left", "right", "up" | null | when movementType is set, this is the direction the child component will move | | distance | number | 0 | when movementType is set, this is the distance the child component will move | | duration | number | 1000 | the length in milliseconds the fade animation will last and the length the movement animation will last when movementType is set to "slide" | | easing | React Native Easing function | Easing.out(Easing.exp) | the easing function to define animation curve | | fade | boolean | true | when true the child component will fade in or out depending on the aim | | friction | number | 5 | when movementType is set to "spring" or staticType is set to "bounce" this is the amount of friction applied to the animation | | movementType | "slide", "spring" | null | when direction and distance are set, the type of movement animation | | staticType | "bounce", "zoom" | null | when set the child component will "bounce" or "zoom" in our out depending on the aim | | style | object | undefined | additional styles applied to the component | | tension | number | 100 | when movementType is set to "spring" or staticType is set to "bounce" this is the amount of friction applied to the animation | | useNativeDriver | boolean | true | when true the animation is sent to native before starting, allowing native code to perform the animation on the UI thread without having to go through the bridge on every frame |

Demo Application

This repository contains a demo React Native application with a customizable example of the SimpleAnimation component in use. The demo application was built using Expo.

To use the demo application install Expo using the installation instructions located here, clone this repository, run the application using the expo-cli. Then open the application on the iOS Simulator, Gennymotion Android Emulator, or your mobile device.

  1. Clone this repository: https://github.com/joeyschroeder/react-native-simple-animations.git
  2. Navigate to the demo application: cd path/to/this/repository/react-native-simple-animations/example/reactreact-native-simple-animations-example-app
  3. Install demo application dependencies: npm install
  4. Run npm run start

Using the Expo CLI, you'll be able to view the demo application in the iOS Simulator or Gennymotion Android Android Emulator, or on your mobile device using the iOS Expo Client or Android Expo Client.

Built With

  • React Native - A framework for building native apps using React
  • Expo - A toolchain built around React Native to help build native iOS and Android projects

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

Contributing

Please submit a pull request with any features/fixes for the project. I apologize in advance for the slow action on pull requests and issues. Please follow the ESLint rules for the project.

License

This project is licensed under the MIT License - see the MIT Open Source Initiative for details.

Acknowledgments

Hat tip to anyone who's code was used! 🤠