npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

text-flashy-reveal.js

v0.1.1

Published

A lightweight JavaScript library for creating beautiful text flashy-reveal animations that trigger on scroll.

Readme

TextFlashyReveal.js

A lightweight JavaScript library for creating beautiful text flashy-reveal animations that trigger on scroll. Perfect for headers, hero sections, and any text that needs to grab attention with a smooth, staggered reveal effect.

✨ Features

  • 🎯 Zero dependencies - Just plain JavaScript
  • 🎨 Customizable - Adjust colors, timing, and animation behavior
  • 📱 Scroll-triggered - Uses Intersection Observer for performance
  • 🔄 Replay support - Animations can replay on scroll
  • Lightweight - Minimal impact on your bundle size

🚀 Quick Start

<!DOCTYPE html>
<html>
<head>
    <title>TextFlashyReveal.js Demo</title>
</head>
<body>
    <h1 id="hero">Welcome to TextFlashyReveal.js</h1>
    
    <script type="module">
        import { textFlashyReveal } from "./text-reveal.js";
        
        textFlashyReveal(document.querySelector("#hero"));
    </script>
</body>
</html>

📖 API Reference

textFlashyReveal(element, options)

Parameters:

  • element (HTMLElement): The text element to animate
  • options (Object): Configuration options

Options:

{
    accentColor: "#ff7a00",    // Color during fade-in
    finalColor: "#000",         // Final color after animation
    revealDelay: 40,            // Delay between characters (ms)
    fadeDuration: 350,          // Fade-in duration (ms)
    colorDelay: 300,            // Color transition delay (ms)
    replay: false,              // Replay animation on scroll back
    threshold: 0.4              // Intersection observer threshold
}

Returns:

  • Function: Cleanup function to disconnect the observer

💡 Examples

Basic Usage

import { textFlashyReveal } from "./text-reveal.js";

textFlashyReveal(document.querySelector("h1"));

Custom Colors and Timing

textFlashyReveal(document.querySelector("#hero"), {
    accentColor: "#3b82f6",
    finalColor: "#1e293b",
    revealDelay: 25,
    fadeDuration: 200
});

Replay on Scroll

textFlashyReveal(document.querySelector("#replay-text"), {
    replay: true,
    threshold: 0.5,
    revealDelay: 35
});

🎯 Use Cases

  • Hero sections - Make your main headlines pop
  • Feature lists - Reveal bullet points with style
  • About sections - Add personality to your story
  • Call-to-actions - Draw attention to important messages
  • Portfolio pieces - Give your work that extra polish

🔧 How It Works

TextFlashyReveal.js splits text into individual character spans, then uses CSS transitions and Intersection Observer to:

  1. Hide characters initially
  2. Detect when element enters viewport
  3. Stagger character reveals with randomized order
  4. Transition from accent color to final color
  5. Optionally reset for replay

📄 License

MIT License - feel free to use in personal and commercial projects.

👨‍💻 Author

Created by Rogerio Taques


Made with ☕️ and plain JavaScript! 🎉