watadarkstar / react-native-typing-animation

💬 A typing animation for your React Native chat app based on simple trigonometry to create better loaders.
https://www.npmjs.com/package/react-native-typing-animation
MIT License
282 stars 15 forks source link
animation chat component react-native

example

💬 React Native Typing Animation

A typing animation for your React Native chat app
based on simple trigonometry to create better loaders.

npm version build

Features

Installation

Example

import React from "react";
import { TypingAnimation } from "react-native-typing-animation";

class Example extends React.Component {
  render() {
    return <TypingAnimation />;
  }
}

Advanced Example

import React from "react";
import { TypingAnimation } from "react-native-typing-animation";

class Example extends React.Component {
  render() {
    return (
      <TypingAnimation
        dotColor="black"
        dotMargin={3}
        dotAmplitude={3}
        dotSpeed={0.15}
        dotRadius={2.5}
        dotX={12}
        dotY={6}
      />
    );
  }
}

Props

React Native Web

The library works with React Native Web. You can see a working example here and the source code is available here. If you are using create-react-app it might be worth copying the library source files into your app instead of installing it as a dependency to avoid react-native alias issues. See the /example-rn-web directory for what I mean.

License

Author

Feel free to ask me questions on Twitter @icookandcode!

Credits

Work is based on the amazing article "How you can use simple Trigonometry to create better loaders" by Nash Vail

Contributors

Submit a PR to contribute :)

Roadmap

Release

We use release-it, to release do the following:

yarn run release:dry
yarn run release

Changelog