Update: TypeIt is fully compatible with jQuery 3.2.1+!
TypeIt is the most versatile, user-friendly jQuery animated typing plugin on the planet. In simple use, it allows you to type single or multiple strings that break lines, delete & replace each other, and it even handles HTML tags & entities.
For more advanced, controlled typing effects, TypeIt comes with companion functions that can be chained to tweak your typing down to the smallest character, enabling you to type not just a few strings of text, but an entire narrative, with complete control over speed, characters, line breaks, deletions, pauses, everything.
Checkout several demos and a sandbox where you can try it out at macarthur.me/typeit.
View the full documentation for using TypeIt here: macarthur.me/typeit/docs.
The code is out there to check out and use for any personal project, 100% free. But if you're thinking about using TypeIt commercially, check out the license options below that'll get you full support if it's ever needed.
Get it from this repo, or from the following sources:
https://cdnjs.cloudflare.com/ajax/libs/typeit/4.3.0/typeit.min.json your page.
npm install typeit.
You're ready to start typing!
In it's simplest use, just call
typeIt() on any element and include your options.
To control your typing down to the smallest character, there are five companion functions available to use. Simply chain them together following a typeIt() call on an element, and your chain will execute. You can define your global settings within the function call like usual, and can even change settings on the fly throughout the chain.
|tiType()||(string) Characters (including those wrapped in HTML) to be typed.||Will type the characters.|
|tiDelete()||(number) Number of characters to be deleted from what's already been typed.||Will delete the specified number of characters.|
|tiEmpty()||(none)||Will instantly delete everything that has already been typed.|
|tiPause()||(number) Number of milliseconds to pause before continuing.||Will pause the specified number of milliseconds.|
|tiBreak()||(none)||Will break the typing to a new line.|
|tiSettings()||(JSON) Options you'd like to update||Will redefine your options on the fly. This will only work for updating the
You can modify the options for the plugin by passing in JSON.
There are a number of options you may use to customize TypeIt. For more details on these options, view the full documentation.
|strings||(string or array) The string(s) to be typed.||'Your default string.'|
|speed||(number in millseconds) The typing speed.||100|
|deleteSpeed||(number in millseconds) The deletion speed. If left undefined, will be 1/3 of the type speed.||undefined|
|lifeLike||(boolean) Will make the typing pace irregular, as if a real person is doing it.||true|
|cursor||(boolean) Show a blinking cursor at the end of the string(s).||true|
|cursorSpeed||(number in milliseconds) The blinking speed of the cursor.||1000|
|breakLines||(boolean) Choose whether you want multiple strings to be printed on top of each other (
|breakDelay||(number in milliseconds) The amount of time (milliseconds) between line breaks when typing multiple strings. Only effective when
|deleteDelay||(number in milliseconds) The amount of time (milliseconds) between deleting the current string and typing the next. Only effective when
|startDelete||(boolean) Whether to begin instance by deleting strings inside element, and then typing what strings are defined via JSON or companion functions.||false|
|startDelay||(number in milliseconds) The amount of time before the plugin begins typing after initalizing.||250|
|loop||(boolean) Have your string or strings continuously loop after completing.||false|
|loopDelay||(number in milliseconds) The amount of time between looping over a string or set of strings again.||750|
|html||(boolean) Handle strings as HTML, which will process tags and HTML entities. If 'false,' strings will be typed literally.||true|
|callback||(function) A function that executes after your typing has completed.||nuthin'|
If I've made your life eaiser in some way by creating this thing and want to kick a small "thank you" my way, I'd very much appreciate it!