๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js

I’ve always been fascinated by JavaScript and have been learning how the npm registry works. As someone who loves animation and enjoys adding life to static text, I decided to build Typeglide to make the command line more interesting and engaging.

I…


This content originally appeared on DEV Community and was authored by Dieke Sydney

I've always been fascinated by JavaScript and have been learning how the npm registry works. As someone who loves animation and enjoys adding life to static text, I decided to build Typeglide to make the command line more interesting and engaging.

In the world of terminal applications and CLI tools, adding dynamic, eye-catching effects can significantly improve user experience. Whether you're building an interactive console application or just want to add some flair to your scripts, Typeglide is here to help!

Typeglide is a lightweight typing effect library designed for Node.js. It provides a smooth, customizable way to simulate typing animations in terminal applications. With built-in features for speed control, looping, shuffling, and more, Typeglide makes it easy to bring text to life.

๐Ÿ“ฆ Installation

Install Typeglide using npm:

npm install typeglide

๐Ÿš€ Quick Start

Setting up Typeglide is straightforward. Here's a basic example:

import typeglide from "typeglide";

var myArray = [
  "Good morning",
  "How are you today?",
  "Would you like a cup of coffee?",
];

typeglide({ strings: myArray });

This will display the provided strings as if they were being typed in real-time.

โฑ Customize Speeds & Delays

Fine-tune the typing effect with typing speed, backspacing speed, and delays:

import typeglide from "typeglide";

typeglide({
  strings: myArray,
  typeSpeed: 70,   // Typing speed (milliseconds)
  backSpeed: 50,   // Backspacing speed
  startDelay: 10,  // Delay before typing starts
  backDelay: 100,  // Delay before backspacing
});

This level of customization ensures that you can create the perfect typing animation.

๐Ÿ” Looping Strings

Enable looping and define how many times to repeat:

import typeglide from "typeglide";

typeglide({
  strings: myArray,
  loop: true,       // Enable looping
  loopCount: 3,     // Number of times to repeat
});

Perfect for CLI apps that need continuous messaging.

โœจ Extra Features

Typeglide comes with additional options:

Name Required Default Description
backspace(bool) no true Disable backspace to type each string on a new line
backspaceLastString(bool) no true Whether to backspace last string on the array
shuffle(bool) no false Shuffle the strings on the array
singleLine(bool) no false Types strings on a single line
seperator(string) when singleLine is activated empty string Seperate strings on single line

For example, to shuffle the strings and keep them on a single line:

import typeglide from "typeglide";

typeglide({
  strings: myArray,
  shuffle: true,
  singleLine: true,
  separator: " | ", // Example: "Good morning | How are you today? | ..."
});

๐Ÿค Contributing

As I'm constantly exploring JavaScript/Typescript and learning about npm, I'm open to feedback and ideas to make Typeglide even better! ๐ŸŽ‰

Feel free to create an issue if you encounter bugs or have suggestions.

You can also make a pull request to add new features!

Check out the repository on GitHub:
๐Ÿ”— Typeglide on GitHub

๐Ÿ“œ License

MIT License โ€“ Free to use, modify, and distribute.

๐Ÿ“Œ Author: Dieke Sydney Sydney205

๐Ÿ“ฅ Install & Try It Today!

Ready to enhance your terminal applications? Install Typeglide now:

npm install typeglide

Let me know what you think! I'm always open to feedback, ideas, and improvements. ๐Ÿš€


This content originally appeared on DEV Community and was authored by Dieke Sydney


Print Share Comment Cite Upload Translate Updates
APA

Dieke Sydney | Sciencx (2025-02-11T23:41:19+00:00) ๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js. Retrieved from https://www.scien.cx/2025/02/11/%f0%9f%9a%80-typeglide-a-simple-typing-effect-library-for-node-js/

MLA
" » ๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js." Dieke Sydney | Sciencx - Tuesday February 11, 2025, https://www.scien.cx/2025/02/11/%f0%9f%9a%80-typeglide-a-simple-typing-effect-library-for-node-js/
HARVARD
Dieke Sydney | Sciencx Tuesday February 11, 2025 » ๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js., viewed ,<https://www.scien.cx/2025/02/11/%f0%9f%9a%80-typeglide-a-simple-typing-effect-library-for-node-js/>
VANCOUVER
Dieke Sydney | Sciencx - » ๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/11/%f0%9f%9a%80-typeglide-a-simple-typing-effect-library-for-node-js/
CHICAGO
" » ๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js." Dieke Sydney | Sciencx - Accessed . https://www.scien.cx/2025/02/11/%f0%9f%9a%80-typeglide-a-simple-typing-effect-library-for-node-js/
IEEE
" » ๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js." Dieke Sydney | Sciencx [Online]. Available: https://www.scien.cx/2025/02/11/%f0%9f%9a%80-typeglide-a-simple-typing-effect-library-for-node-js/. [Accessed: ]
rf:citation
» ๐Ÿš€ Typeglide: A Simple Typing Effect Library for Node.js | Dieke Sydney | Sciencx | https://www.scien.cx/2025/02/11/%f0%9f%9a%80-typeglide-a-simple-typing-effect-library-for-node-js/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.