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
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",
},
});
Resources
- For more examples: CodeSandbox.io
- NPM: @apolloeagle/loading-dots
- GitHub: @apolloeagle/loading-dots
- Animations inspired by: @nzbin/three-dots
Top comments (0)