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-spinning-image

v1.0.2

Published

Simple React Native Spinning Image for Loaders or Animated UI

Downloads

36

Readme

react-native-spinning-image

About

Simple spinner for any image file or link that is supported within React Native. Perfect for using a custom icon or image in a loading screen.

Usage

First install the package using the following:

npm i react-native-spinning-image

or

yarn add react-native-spinning-image

Import the package into your React Native file.

import SpinningImage from 'react-native-spinning-image';

Note

If you you are using an http link you can just enter the link into the source property. However, if you are using a static or local asset you must require it first as follows:

const imageSource = require('../PathToImage');

Add the Loader to your component.

<SpinningImage source={imageSource} />

or

<SpinningImage source='https://link-to-image' />

You can also adjust settings like in the example below:

<SpinningImage
  source={imageSource}
  speed={3000}
  rotations={5}
  height={400}
  width={300}
  direction='counter'
/>

Properties

| Property | Default | Description | | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | source | None | Image source. Enter as a string if using a web url and use a require variable if using a local image as shown in the above example. A source property is required. | | speed | 5000 | Speed of image rotation in milliseconds. A higher number is a slower rotation speed. | | rotations | null | Set number of rotations for image to spin. It will spin infinitely without an entered property value or a property value of 0 | | height | 200 | Sets height of image | | width | 200 | Sets width of image | | direction | null | Set to "counter" to make it spin counterclockwise. |

Issues

  • As of now this is written as a class component since React Hooks do not work well with some tools like Expo. Once it becomes stable I will switch this over to a React Hook.

Address any issues or feature requests @

https://github.com/theranbrig/react-native-spinning-image/issues

Author

Theran Brigowatz is a Full-stack Web Developer currently out of Seoul, South Korea, but transitioning back to the US. Check him out at the following: