2.1.3 • Published 1 year ago

rn-animated-ellipsis v2.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

React Native Animated Ellipsis

A simple, customizable animated dots component ideal for loading screens in React Native apps (forked from adorableio/react-native-animated-ellipsis - not maintained).

Kinda like iOS

Installation

using npm

npm install rn-animated-ellipsis

or using yarn

yarn add rn-animated-ellipsis

Importing

import AnimatedEllipsis from 'rn-animated-ellipsis';

Usage

Just include the component in the output of any other component like this:

render() {
  return (
    <View>
      <Text>
        Loading
        <AnimatedEllipsis />
      </Text>
    </View>
  );
}

which will get you something like this:

Basic Example

Props

Customize the number of dots, animation speed, and style using these props:

PropertyDescription
numberOfDotsThe number of dots you'd like to show. Defaults to 3.
animationDelayThe length in milliseconds of each phase of the animated. Defaults to 300.
minOpacityThe minimum opacity for the dots. Defaults to 0.
styleCSS to apply to the dots. It accepts any styles that a normal <Text /> component can take.
useNativeDriverSpecify true or false. Defaults to true.

More Examples

Ten Dots Example

<AnimatedEllipsis numberOfDots={10} />

Complex Example

<AnimatedEllipsis 
  numberOfDots={4}
  animationDelay={150}
  style={{
    color: 'red',
    fontSize: 72,
  }}
/>

Kinda like iOS

<AnimatedEllipsis 
  numberOfDots={3}
  minOpacity={0.4}
  animationDelay={200}
  style={{
    color: '#94939b',
    fontSize: 100,
    letterSpacing: -15,
  }}
/>