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

react-typewriter-lib

v1.2.1

Published

A simple and easy-to-use React component for creating typewriter effects.

Readme

React Typewriter Library

A lightweight React library that simulates a typewriter effect on any text string, with optional looping.


Installation

Install the library via npm:

npm install react-typewriter-lib

Or with Yarn:

yarn add react-typewriter-lib

This library declares React and ReactDOM as peerDependencies, so ensure they are installed in your project.


Usage

Import the Typewriter component and pass the text prop. You can also customize the typing speed, set a pause between typing and deleting, and enable loop to repeat the animation.

import React from 'react';
import { Typewriter } from 'react-typewriter-lib';

export default function App() {
  return (
    <div>
      <h1>
        <Typewriter
          text="Hello, world!"
          speed={100}    // Delay in ms between each character
          pause={1500}   // Pause in ms between typing and deleting
          loop           // Enables looping (type → pause → delete → pause → ...)
        />
      </h1>
    </div>
  );
}

Props

| Name | Type | Default | Description | | ------- | --------- | ------- | ------------------------------------------------------------------------------------- | | text | string | — | The string to be typed out. | | speed | number | 100 | Delay in milliseconds between each character typed or deleted. | | pause | number | 1000 | Duration of the pause (ms) between the end of typing and the start of deleting, and vice versa. | | loop | boolean | false | If true, the text types, pauses, deletes, pauses, then repeats in a loop. |


Configuration

No additional configuration is required. This library is built and bundled with Vite in library mode, supporting both ESM and CommonJS formats.

Examples

  • Fast typing
    <Typewriter text="Fast typing..." speed={50} />
  • One-time typing
    <Typewriter text="One-shot typing." />

Styling and Accessibility

  • The component renders a <span>, so you can wrap or style it as needed (CSS, Tailwind, styled-components, etc.).
  • For accessibility, consider adding an aria-label if the animated text conveys critical information.

Contributing

Contributions, bug reports, and feature requests are welcome! Please open an issue or submit a pull request on GitHub.


License

MIT © Sofiane Rahmani 2025