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-simple-typewriter-vb

v1.1.0

Published

A simple React typewriter effect package.

Readme

react-simple-typewriter-vb

A lightweight React package to create a typewriter effect effortlessly. Perfect for adding dynamic and engaging text animations to your projects.

Features

  • 🚀 Simple and easy-to-use API
  • ⚡ Lightweight and fast
  • 🎨 Customizable typing and deleting speeds
  • 🔄 Rotates through multiple strings
  • ⚙️ Configurable loop behavior
  • 🎭 Smooth delete animation effect
  • ✨ Next.js compatible
  • 🖥️ Server-side rendering support
  • 🎯 Zero dependencies
  • 📱 Responsive and accessible
  • 🎨 Customizable styling

Installation

Install the package using npm:

npm install react-simple-typewriter-vb

Or using yarn:

yarn add react-simple-typewriter-vb

Usage

Here's how to use the TypeWriter component in your React project:

import React from 'react';
import { TypeWriter } from 'react-simple-typewriter-vb';

const App = () => {
  return (
    <TypeWriter
      options={{
        strings: ['Hello, World!', 'Welcome to React Simple Typewriter!'],
        speed: 100, // Typing speed in ms (default: 50)
        pause: 2000, // Pause duration in ms before rotating to the next string (default: 1000)
      }}
    />
  );
};

export default App;

Props

| Prop | Type | Default | Description | |-----------|--------|---------|------------------------------------------------| | options | Object | N/A | Options to configure the typewriter behavior. |

Options

| Option | Type | Default | Description | |--------------|-----------|---------|-----------------------------------------------------| | strings | string[]| [] | Array of strings to type. | | speed | number | 50 | Typing speed in milliseconds. | | deleteSpeed| number | 30 | Deleting speed in milliseconds. | | pause | number | 1000 | Pause duration in milliseconds between strings. | | loop | boolean | true | Whether to loop through the strings continuously. |

Example

import React from 'react';
import { TypeWriter } from 'react-simple-typewriter-vb';

const Example = () => (
  <TypeWriter
    options={{
      strings: ['React is awesome!', 'Try this typewriter effect!'],
      speed: 75,
      pause: 1500,
      loop: false,
      deleteSpeed: 90,
    }}
  />
);

export default Example;

Advanced Usage

With Custom Styling

You can customize the appearance of the TypeWriter component by wrapping it with your own styled component:

import React from 'react';
import { TypeWriter } from 'react-simple-typewriter-vb';

const StyledExample = () => (
  <div style={{ 
    fontFamily: 'monospace',
    fontSize: '2em',
    color: '#333',
    padding: '20px'
  }}>
    <TypeWriter
      options={{
        strings: ['Custom styled typewriter!', 'Make it your own!'],
        speed: 75,
        pause: 1500,
      }}
    />
  </div>
);

With Next.js

The component is fully compatible with Next.js, including server-side rendering:

// pages/index.tsx
import { TypeWriter } from 'react-simple-typewriter-vb';

export default function Home() {
  return (
    <main>
      <h1>
        <TypeWriter
          options={{
            strings: ['Welcome to Next.js!', 'Built with TypeWriter'],
            speed: 50,
            loop: true,
          }}
        />
      </h1>
    </main>
  );
}

TypeScript Support

The package includes TypeScript definitions out of the box:

import { TypeWriter, TypewriterProps } from 'react-simple-typewriter-vb';

const options: TypewriterProps['options'] = {
  strings: ['TypeScript Support!', 'Full type safety!'],
  speed: 50,
  pause: 1000,
  loop: true,
};

const TypeScriptExample = () => (
  <TypeWriter options={options} />
);

Changelog

1.1.0

  • Added deleteSpeed option
  • Improved server-side rendering
  • Added TypeScript support
  • 🔄 Improved loop behavior with proper word completion
  • ⚡ Optimized animation performance using useRef
  • 🛠️ Fixed last word deletion when loop is false
  • 🔧 Better Next.js integration with proper 'use client' directive handling
  • 🎯 Improved TypeScript definitions

1.0.3

  • Initial public release
  • Basic typewriter functionality
  • Customizable speeds and pauses

Development

If you'd like to contribute or modify the package locally:

  1. Clone the repository:

    git clone https://github.com/vito8916/react-simple-typewriter.git
  2. Install dependencies:

    npm install
  3. Build the package:

    npm run build
  4. Link the package locally for testing:

    npm link
  5. Test the package in a local project:

    npm link react-simple-typewriter-vb

License

This project is licensed under the MIT License.


Made with ❤️ by Victor Alvarado (https://github.com/vito8916).