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

x-typewriter

v1.0.0

Published

type-writer is a text effect web component (block element). Whatever you put in the innerText will look like

Downloads

2

Readme

Published on webcomponents.org

TypeWriter:

What is it?

type-writer is a text effect web component (block element). Whatever you put in the innerText will look like its being type out. There are four types of cursors that can be set and two types of typing effects. You can set the font-size but at the moment it only uses the Source Code Pro font but in the future I will add support whatever font a user would like to use.

Alt text

Click here for Demo

How to use it?

It is quite easy to use it on your webpage. Just follow the below steps:

  1. Include the link to the script file that holds the this custom web component (reveal-box.js) near the bottom of the body section of your webpage. See below
    <script src="./typewriter.js"></script>
  1. Then use the custom element tags on your webpage.
    <type-writer cursor="underline" effect="standard" align="left" fontsize="28px">
        This is a typewriter effect
    </type-writer>

Note: That is all you have to do to use this custom element. There is an example HTML page (acronym.html) that shows how to use it.

    <!DOCTYPE html>
    <html>
      <head>
        <title>Typewriter Web Component</title>
        <style>
       
            body {
                padding: 40px;
                background-color: #121212;
                color: white;
            }
            
        </style>
      </head>
      
      <body>
      
        <h1 style="padding: 10px, 0px, 0px, 25px; margin: 20px">Typewriter web component:</h1>

        <type-writer cursor="underline" effect="standard" align="left" fontsize="28px">
            This is a test.
        </type-writer>

        <script src="./typewriter.js"></script>

      </body>
      
    </html>

There are only four properties that you can use to customize this element.

There are six attributes that you can set:

  1. cursor - the type of cursor that will be used for the typing effect
  2. effect - the type of typing effect that will be used
  3. align - is used to set how the text will be aligned in the DIV tag
  4. fontsize - The font-size that the text will take
  5. textcolor - The color of the text
  6. cursorcolor - the color of the cursor

Note: The inner text within the type-writer tag will be the text used for the typing effect

Type of Cursor (There are four types):

  1. line
  2. underline
  3. block
  4. none

Type of effect (There are two):

  1. standard - the cursor would jump in steps to make it look like the text is being typed
  2. smooth - the cursor would travel smoothly across the screen without jumping.

Types of aligment:

  1. left
  2. right
  3. center

To Do:

  1. Add support for more fonts families

Note: The default attributes are (cursor: line, effect: standard. align: left and font-size: 28px)