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 🙏

© 2026 – Pkg Stats / Ryan Hefner

typing-placeholder-input

v0.0.3

Published

A small library to animate placeholder typing for input elements.

Readme

typing-placeholder-input

A small library to animate placeholder text with a typing effect for input and textarea elements. Works with both Vanilla JS and React.

npm License TypeScript


✨ Features

  • Typewriter-like animated placeholder text
  • Works with both <input> and <textarea> elements
  • Lightweight and dependency-free core
  • React wrapper with full type support
  • TypeScript compatible

📦 Installation

npm install typing-placeholder-input
# or
yarn add typing-placeholder-input

✨ Demo


🚀 Quick Start

✅ Vanilla JavaScript

<input id="typer" />
<textarea id="typer-textarea"></textarea>

<script type="module">
  import { PlaceholderTyper } from "typing-placeholder-input";
  // import { PlaceholderTyper } from "https://cdn.jsdelivr.net/npm/typing-placeholder-input/dist/index.js";

  new PlaceholderTyper("#typer", {
    strings: [
      "Looking for inspiration?",
      "Type a keyword: AI, nature, dreams...",
      "Start typing to unlock ideas ✨",
    ],
    speed: 100,
    delayBetween: 1000,
    deleteSpeed: 60,
    loop: true,
    cursor: "|",
  });

  new PlaceholderTyper("#typer-textarea", {
    strings: [
      "Start typing your thoughts here...",
      "A poem, an idea, or just a random note.\nNo pressure, just flow.",
    ],
    speed: 100,
    delayBetween: 1000,
    deleteSpeed: 60,
    loop: true,
    cursor: "|",
  });
</script>

✅ React

import React from "react";
import PlaceholderTyperWrapper from "typing-placeholder-input/react";

function App() {
  return (
    <PlaceholderTyperWrapper
      as="input"
      strings={["Hello", "World", "Start typing..."]}
      speed={100}
      delayBetween={1500}
      deleteSpeed={50}
      loop
      cursor="|"
      className="my-input"
      onChange={(e) => console.log(e.target.value)}
    />
  );
}

export default App;

You can also use as="textarea" to render a <textarea> instead of an <input>.

🔧 Props

These options apply to both the vanilla and React version:

| Prop | Type | Default | Description | | -------------- | ---------- | -------- | -------------------------------------- | | strings | string[] | required | The phrases to type | | speed | number | 70 | Typing speed (ms per character) | | deleteSpeed | number | 40 | Deleting speed (ms per character) | | delayBetween | number | 1500 | Delay between strings | | loop | boolean | true | Whether to loop the typing animation | | cursor | string | "" | Character to show at the end of typing |

Additionally, the React wrapper supports all native <input> or <textarea> props.

🧪 Examples

Vanilla Demo

Open example/vanilla/index.html in a browser or run:

npm run example:vanilla

React Demo

Located in example/react/, run:

cd example/react
npm install
npm run dev

🛠 Development

# Build library
npm run build

Uses vite-plugin-dts for generating bundled type declarations.


🧾 License

MIT © Ismail Aslan


🙌 Feedback / Contributions

PRs and issues welcome. If you use this in your project, I’d love to hear about it!