Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akzhy/typebot
Javascript library for typing animation
https://github.com/akzhy/typebot
Last synced: 3 months ago
JSON representation
Javascript library for typing animation
- Host: GitHub
- URL: https://github.com/akzhy/typebot
- Owner: akzhy
- License: mit
- Archived: true
- Created: 2016-07-16T11:12:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-10T01:30:20.000Z (about 8 years ago)
- Last Synced: 2024-05-21T03:57:43.591Z (6 months ago)
- Language: HTML
- Size: 4.51 MB
- Stars: 18
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-web-animation - Typebot - JavaScript library for typing animation. (Text)
README
# typebot
Javascript library for typing animation**Usage:**
include
```html```
And in js
```javascript
new typebot(element,speed,delay,text,blinker,paused)
```The argument `element` is the element to be selected eg: `"#myElement"`,`".myElement"`
`speed` is the typing speed and `delay` is the delay between the typing of each letter
`text` must be an array containing the text to be typed. Each element in the array acts as a new line.
`blinker`(boolean) set to `true` shows the blinker and set to `false` hides the blinker.
`paused`(boolean) set to `true` will pause the typing and will not start typing until `.start()` is called.Methods:
`.done(function)` executes after all the texts are typed with the function given in the argument
`.onLayerEnd(function)` executes at the end of a line
`.onLayerStart(function)` executes at the beginning of a line
`.whileTyping(function)` executes as each letter is typed
`.onstart` executes at the beginning of each line
`.pause()` pauses the typing and `.start()` continues it
`.destroy()` terminates typing
**[Demo on Codepen](http://codepen.io/akshay-7/pen/Wxrgrw)**