Socket
Socket
Sign inDemoInstall

react-native-typing-animation

Package Overview
Dependencies
735
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-typing-animation

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


Version published
Maintainers
1
Weekly downloads
37,087
decreased by-16.7%
Install size
628 kB

Weekly downloads

Readme

Source

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

  • Smooth movement
  • Customizable
  • No dependencies
  • Fast, lightweight and no images
  • Uses requestAnimationFrame

Installation

  • Using npm: npm install react-native-typing-animation --save
  • Using Yarn: yarn add react-native-typing-animation

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

  • style (Object) - Container styles; default is {}
  • dotColor (String) - Dot color; default is #000 (black)
  • dotStyles (Object) - Dot styles; default is {}
  • dotRadius (Integer) - Dot radius; default is 2.5
  • dotMargin (Integer) - Dot margin, the space between dots; default is 3
  • dotAmplitude (Integer) - Dot amplitude; default is 3
  • dotSpeed (Integer) - Dot speed; default is 0.15
  • dotY (Integer) - Dot y, the starting y coordinate; default is 6
  • dotX (Integer) - Dot x, the x coordinate of the center dot; default is 12

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

  • Move from requestAnimationFrame to Animated with useNativeDriver (PRs welcome)
  • Integrate with Gifted Chat
  • Unit tests (PRs welcome)

Release

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

yarn run release:dry
yarn run release

Changelog

  • Allow animation speed to be configurable

Keywords

FAQs

Last updated on 28 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc