Package Exports
- react-native-typing-animation
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-typing-animation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
💬 React Native Typing Animation
A typing animation for your React Native chat app
based on simple trigonometry to create better loaders.
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}
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 is2.5dotMargin(Integer) - Dot margin, the space between dots; default is3dotAmplitude(Integer) - Dot amplitude; default is3dotY(Integer) - Dot y, the starting y coordinate; default is6dotX(Integer) - Dot x, the x coordinate of the center dot; default is12
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
- Allow animation speed to be configurable (PRs welcome)
- Unit tests
Release
We use release-it to release do the following:
yarn run releaseChangelog
TODO