Categories: CSSScriptWeb Design

Text Shuffle Animation In Pure JavaScript – shuffle-text.js

shuffle-text.js is a pure JavaScript library that presents your text letter by letter with a character shuffle animation.

Install it via NPM:

$ npm install shuffle-text

How to use it:

Just import the shuffle-text.js into the html page and we’re ready to go.

<script src="shuffle-text.js"></script>

Create a new instance of the ShuffleText and specify the text container as this:

var el = document.getElementById("myText");
var text = new ShuffleText(el);

Start the shuffle animation:

text.start();

Stop the shuffle animation:

text.stop();

Re-set the text to animate:

text.setText(text: string);

Changelog:

12/04/2025

  • v0.5.1

07/24/2024

  • v0.3.5

10/02/2021

  • v0.3.5

05/06/2021

  • v0.3.4

02/21/2021

  • v0.3.2

07/11/2020

  • v0.3.1

08/30/2018

  • v0.3.0

10/01/2018

  • v0.2.8

The post Text Shuffle Animation In Pure JavaScript – shuffle-text.js appeared first on CSS Script.

rssfeeds-admin

Share
Published by
rssfeeds-admin

Recent Posts

Microsoft Teams Flaw Allows Hackers to Launch Spoofing Attacks

A newly disclosed security vulnerability in Microsoft Teams could allow attackers to spoof local devices,…

4 minutes ago

Critical SandboxJS Flaw Enables Host System Takeover

A critical security flaw has been discovered in SandboxJS, a widely used JavaScript sandboxing library…

4 minutes ago

How Top SOCs and MSSPs Prevent Phishing Incidents Missed by Email Filters

Email filters are important, but they can’t remove phishing risk on their own. Today’s campaigns are built to…

22 minutes ago

Foxconn Confirms Cyberattack After Nitrogen Ransomware Gang Claim

Foxconn has officially confirmed a cyberattack targeting its North American operations after the Nitrogen ransomware…

23 minutes ago

Indianapolis 500 officials are expecting 2nd straight race-day sellout, marking 3rd time in 10 years

INDIANAPOLIS (AP) — Reserved seating for this year’s Indianapolis 500, the world’s largest single-day sporting…

34 minutes ago

Indianapolis 500 officials are expecting 2nd straight race-day sellout, marking 3rd time in 10 years

INDIANAPOLIS (AP) — Reserved seating for this year’s Indianapolis 500, the world’s largest single-day sporting…

34 minutes ago

This website uses cookies.