https://github.com/magalhini/react-typewriter-js
Simple vanilla JS script to simulate text typewriting effect.
https://github.com/magalhini/react-typewriter-js
react split typewriter typewriting typing vanilla word
Last synced: 11 months ago
JSON representation
Simple vanilla JS script to simulate text typewriting effect.
- Host: GitHub
- URL: https://github.com/magalhini/react-typewriter-js
- Owner: magalhini
- Created: 2014-06-09T12:38:17.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T15:38:59.000Z (over 8 years ago)
- Last Synced: 2024-04-09T12:09:30.373Z (about 2 years ago)
- Topics: react, split, typewriter, typewriting, typing, vanilla, word
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 19
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
React Typewriter
=============

A small helper script that simulates a typewriting text effect on a webpage.
## Dependencies
There are two versions of this project:
- A plain vanilla JS (no jQuery, no libraries)
- An ES6 / React Component version
## Options
- Custom speed
- Custom random speed
- Different messages (React only)
- Custom tag to display the element (React only)
## Sample Usage (vanilla version)
```js
var el = document.querySelectorAll('h1')[0];
var el2 = document.querySelectorAll('h2')[0];
Typewriter.start(el, 50, {
random: true,
callback: function () {
console.log('i am a callback');
}
});
Typewriter.start(el2, 75);
```
## Sample Usage (React version)
```js
import Typewriter from './Typewriter';
```