项目作者: Gapur

项目描述 :
💬 React Native Dot Typing Animation Component
高级语言: Java
项目地址: git://github.com/Gapur/react-native-dot-typing.git
创建时间: 2020-10-11T16:35:54Z
项目社区:https://github.com/Gapur/react-native-dot-typing

开源协议:MIT License

下载


react-native-dot-typing

💬 React Native Dot Typing

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

Features

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

Demo

image

Installation

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

Example

  1. import React from "react";
  2. import { DotTypingAnimation } from "react-native-dot-typing";
  3. class Example extends React.Component {
  4. render() {
  5. return <DotTypingAnimation ></DotTypingAnimation>;
  6. }
  7. }

Advanced Example

  1. import React from "react";
  2. import { TypingAnimation } from "react-native-dot-typing";
  3. class Example extends React.Component {
  4. render() {
  5. return (
  6. <DotTypingAnimation
  7. dotRadius={16}
  8. dotAmplitude={3}
  9. dotMargin={32}
  10. dotX={0}
  11. dotY={32}
  12. ></DotTypingAnimation>
  13. );
  14. }
  15. }

Properties

  • 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, the speed of the whole animation view; 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
  • show (Boolean) - Visibility, whether the whole animation view is displayed or not; default is true

Acknowledgements

Adrian Carolli (react-native-typing-animation) inspired me to create this project.

License