A component to display loading dots for React Native applications.
Examples: CodeSandbox.io
Animations inspired by @nzbin/three-dots
npm i @apolloeagle/loading-dotsimport React from "react";
import { View, StyleSheet } from "react-native";
import LoadingDots from "@apolloeagle/loading-dots"; // <---- Import package
const Page = () => {
return (
<View style={styles.container}>
<LoadingDots /> {/* <---- Add component */}
</View>
);
};
const styles = StyleSheet.create({
container: {
display: "flex",
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
},
});A list of available props to pass into the <LoadingProps /> component:
| Props | Type | Default | Units | Description |
|---|---|---|---|---|
| animation | String | 'elastic' | n/a | Animation style. Available styles: pulse, elastic, flashing, typing, ping |
| dotNumber | Number | 3 | n/a | Number of dots displayed |
| color | String | rgb(25,203,229) | n/a | Color of dots |
| size | Number | 20 | px | Size of dots |
| spacing | Number | 7 | px | Space between dots |
| delay | Number | 250 | ms | Time between dot rendering |
| duration | Number | 400 | ms | Time of animation |