Home
Softono

Typing Effect Element

Open source MIT JavaScript
126
Stars
6
Forks
1
Issues
6
Watchers
2 months
Last Commit

 About Typing Effect Element

A custom element that shows text as if it were being typed

Platforms

Web Self-hosted

Languages

JavaScript

Need Help Installing Typing Effect Element?

We provide expert installation service for this software. Our team will install, configure, and secure Typing Effect Element on your server. plans start at just $30.

Typing Effect Element

View on GitHub

<typing-effect> element

A custom element that shows text as if it were being typed

Installation

$ npm install @github/typing-effect-element

Usage

import '@github/typing-effect-element'
<typing-effect data-lines='["Welcome to GitHub!", "Let’s begin the adventure"]'>
  <span data-target="typing-effect.content"></span>
  <span data-target="typing-effect.cursor">|</span>
</typing-effect>

Accessibility

This component detects whether prefers-reduced-motion is set on the window:

window.matchMedia('(prefers-reduced-motion)').matches === true

If this evaluates to true, any content lines provided will be appended immediately rather than being typed out with a delay.

Browser support

Browsers without native custom element support require a polyfill.

  • Chrome
  • Firefox
  • Safari
  • Microsoft Edge

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.