1.0.2 • Published 6 months ago

typin v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

Typin

Typin is a lightweight JavaScript library that provides a Typin effect for text elements on your web page. It's a simple way to make your text content more engaging and interactive.

Installation

You can install Typin via npm:

npm i typin

Usage

To use Typin in your project, follow these steps:

  1. Include the library in your JavaScript file:
const Typin = require("Typin");
  1. Create an HTML element that will display the Typin effect. For example:
<div class="Typin-text"></div>
  1. Initialize Typin with your desired options:
const txtElement = document.querySelector(".Typin-text");
const words = ["Hello", "World", "Typin"];
const options = {
  wait: 1000, // Time to wait after typing a word
  deleteSpeed: 50, // Speed of character deletion
  typeSpeed: 100, // Speed of character typing
  cursor: true, // Show blinking cursor
  cursorCharacter: "|", // Cursor character
};

const Typin = new Typin(txtElement, words, options);
  1. Enjoy the Typin effect on your web page!

Options

Typin accepts the following configuration options:

  • wait: Time to wait after typing a word (in milliseconds). Default: 1000ms.
  • deleteSpeed: Speed of character deletion. Default: 50ms.
  • typeSpeed: Speed of character typing. Default: 100ms.
  • cursor: Show a blinking cursor. Default: true.
  • cursorCharacter: Character to use for the cursor. Default: '|'.

Examples

For more examples and usage, please check out the example directory.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contact

Contributing

We welcome contributions and bug reports. Please see CONTRIBUTING.md for details.

Changelog

See the CHANGELOG.md file for details about what's new.

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago