Skip to content

A Zero Dependency Super Lightweight Typewriter Effect JavaScript Library.

License

Notifications You must be signed in to change notification settings

helloukey/my-typewriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

promo-mytypewriter

A Zero Dependency Super Lightweight Typewriter Effect JavaScript Library.

bundle size license npm release zero dependency

Features

  • Super Lightweight (Less than 1KB) 🔥
  • Easy Configuration ⚙
  • Easy Customization ⛏
  • Zero Dependencies! 🤯

CDN

We recommend you to use my-typewriter CDN for quick and easy setup.

<script src="https://cdn.jsdelivr.net/npm/my-typewriter/public/myTypewriter.min.js"></script>

Installation

You can install my-typewriter using NPM command

npm install my-typewriter

Usage/Example

Give a my-typewriter ID to an element.

<h1>
    <span id="my-typewriter"></span>
</h1>

Import and use as shown below. Also, refer to options for customizations.

import { typeWriter } from "my-typewriter";

typeWriter({
    texts: ["example 1", "example 2", "example 3"],
})

Options

Name Default Description
texts [ ] Array of texts to add for typewriter effect.
letterPause 1200 Pause in milliseconds at end letter.
typeSpeed 0 Typing speed in milliseconds.
eraseSpeed 100 Erasing speed in milliseconds.
blinkSpeed 300 Cursor blink speed in milliseconds.
speed 200 Default typing and erasing speed, If both are set to 0.

License

license