@apolloeagle/loading-dots
v3.0.0
Published
A component for displaying loading dots in React Native applications.
Downloads
1,322
Maintainers
Readme
Installation
npm i @apolloeagle/loading-dots
Usage
import 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",
},
});
Styling Options
A list of available props to pass into the <LoadingProps />
component:
| Props | Type | Default | Units | Description |
| --------- | ------ | ------- | ----- | ----------------------------------------------------------------------------------- |
| animation | String | 'pulse' | n/a | Animation style. Available styles: pulse
, elastic
, flashing
, typing
, ping
|
| dots | Number | 3 | n/a | Number of dots displayed |
| color | String | 'black' | n/a | Color of dots |
| size | Number | 10 | px | Size of dots |
| spacing | Number | 2 | px | Space between dots |
| delay | Number | 260 | ms | Time between dot rendering |