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 🙏

© 2024 – Pkg Stats / Ryan Hefner

title-switcher

v2.1.12

Published

Add typing effect to titles and also switch through several titles.

Downloads

96

Readme

title-switcher-v2

This is the updated title-switcher which takes a simpler approach and improves many deficiencies of the original title-switcher.

Add typing effect to titles and also switch through several titles.

This project can be used as a plugin with limited set-up requirements. No need to change the code in the title-switcher.js file except for customization.

Add the titles to the DOM beside each other as child elements of a wrapper element (ex. div). Pass in an identifying attribute for the wrapper such as a class name. The other sample code such as style can be used to improve how it displays.

NO need for any additional library, this runs as is. Compatible in modern browsers from IE9+.

If there are any problems contact me, but set-up should be done based on the sample code for best results.

Live example at https://joshuaheagle.com/projects/title-switcher. Enjoy!

Setup Example

Sequential Titles

    <div class="titles">
        <h4 style='color: #be1010; text-align: center;'>I built this <em>superb</em> <strong>plug-in</strong>.</h4>
        <h4 style='color: #1414af; text-align: right;'><strong>TitleSwitcher</strong> is great to display <em>company
            objectives</em>.</h4>
        <h4 style='color: #ff7816; text-align: center; text-decoration: underline;'>Feel free to contribute and use this
            plug-in.</h4>
        <h4 style='color: #0c710c;'>You can find more projects on <a href='https://github.com/jheagle' target='_blank'>my
            <strong>GitHub</strong></a>.</h4>
    </div>
  const orderedTitles = new TitleSwitcher('.titles', 'typingEffect')
  // the first arguments is to not randomly switch, then the time between switching, and finally the delay of the effect (typing in this case)
  orderedTitles.startTitles({ isRandom: false, delaySwitch: 400, delayEffect: 100 })

Random Titles

    <div class='titles-random'>
        <h4>Innovate</h4>
        <h4>Create</h4>
        <h4>Connect</h4>
        <h4>Socialise</h4>
        <h4>Collaborate</h4>
        <h4>Build</h4>
        <h4>Organise</h4>
        <h4>Broadcast</h4>
    </div>
  const randomTitles = new TitleSwitcher('.titles-random', 'typingEffect')
  // set to random title switching, then defaults are 400 and 200 milliseconds for switch/effects
  randomTitles.startTitles({ isRandom: true })