Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gapur/react-native-dot-typing

💬 React Native Dot Typing Animation Component
https://github.com/gapur/react-native-dot-typing

animation chat component react react-hook react-native

Last synced: 5 days ago
JSON representation

💬 React Native Dot Typing Animation Component

Awesome Lists containing this project

README

        

# 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](example-app.gif)

## Installation

- Using [npm](https://www.npmjs.com/#getting-started): `npm install react-native-dot-typing --save`
- Using [Yarn](https://yarnpkg.com/): `yarn add react-native-dot-typing`

## Example

```jsx
import React from "react";
import { DotTypingAnimation } from "react-native-dot-typing";

class Example extends React.Component {
render() {
return ;
}
}
```

## Advanced Example

```jsx
import React from "react";
import { TypingAnimation } from "react-native-dot-typing";

class Example extends React.Component {
render() {
return (

);
}
}
```

## 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](https://github.com/watadarkstar) ([react-native-typing-animation](https://github.com/watadarkstar/react-native-typing-animation)) inspired me to create this project.

## License

- [MIT](LICENSE)