1.0.0 • Published 2 years ago

rn-loader-component v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

rn-loader-component

rn-loader-component is a React Native component library that provides animated loaders for various types, including "pacman," "yinyang," and "pointburst."

Installation

Make sure you have react-native-reanimated installed. If not, you can install it using:

npm install react-native-reanimated

Then, install the rn-loader-component package:

npm install rn-loader-component

Usage

Import rn-loader-component in your React Native project:

import RNLoaderComponent from 'rn-loader-component';

Use it in your component:

<RNLoaderComponent
  type="pacman"
  duration={2000}
  primaryColor="blue"
  secondaryColor="white"
/>

Example

import React from 'react';
import { View, StyleSheet } from 'react-native';
import RNLoaderComponent from 'rn-loader-component';

const App = () => {
  return (
    <View style={styles.container}>
      <RNLoaderComponent
        type="pacman"
        duration={2000}
        primaryColor="blue"
        secondaryColor="white"
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
});

export default App;

Props

  • type (default: "yinyang"): Specifies the type of loader. Possible values are "pacman," "yinyang," and "pointburst."
  • duration (default: 1000) Duration of the animation in milliseconds.
  • primaryColor (default: "blue"): The primary color of the loader.
  • secondaryColor: (default: "white"): The secondary color of the loader.
1.0.0

2 years ago