DEV Community

Cover image for Loading Dot component for React Native applications
Blake Reimer
Blake Reimer

Posted on

Loading Dot component for React Native applications

I have been working with React Native for several years now and I have always appreciated the contributions made by the React community. I thought this would be a neat opportunity try my hand at open source development. I created a npm package that displays loading dots specifically for React Native applications. The <LoadingDot /> component allows for customization of the following attributes:

  • Animation style
  • Animation delay
  • Quantity
  • Color
  • Size
  • Spacing

Here is how to get started:

Installation

npm i @apolloeagle/loading-dots
Enter fullscreen mode Exit fullscreen mode

Usage

import React from "react";
import { View, StyleSheet } from "react-native";
import LoadingDots from "@apolloeagle/loading-dots";

const Page = () => {
  return (
    <View style={styles.container}>
      <LoadingDots
        animation="pulse"
        dots={4}
        color="white"
        size={15}
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    display: "flex",
    flexDirection: "row",
    alignItems: "center",
    justifyContent: "center",
  },
});
Enter fullscreen mode Exit fullscreen mode

Resources

Top comments (0)