Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minimalist-typewriter

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimalist-typewriter

A very simple and performant package for typing out headings.

  • 1.20.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Typewriter

A minimalist rewrite of Matt Boldt's Typed.js.

View the demo on GitHub Pages.


React

<h1>
    <Typewriter strings={['My first string', 'My second string']} default="Prefill goes here" />
</h1>

or

<h1>
    <Typewriter strings={['My first string', 'My second string']}>
        My prefill text
    </Typewriter>
</h1>

Traditional usage:

  1. Include with <script src="typewriter.min.js"></script>.
  2. Call with new Typed(selector, strings, config).

selector should be a CSS selector (will only select first match) for the element to bind to, strings should be an array containing the strings to transition to, and config is an optional argument that should be an object of form:

{
    "default": "This is my default string.",
    "typeSpeed": 100, // default: "natural" 
    "backSpeed": 75, // default: "natural"
    "cursor": false,
    "highlight": true,
    "loop": false,
}

i.e., new Typewriter("#typed-text", ["My first string", "My second string"]).

Notes

  • Unlike Typed.js, loop is true by default and starts automatically. The default string is set immediately, and then the strings are cycled through. Transitioning between two strings like This is my first string and This is my second string will type naturally, backspacing only to This is my and then typing out the rest of the string.

Client-side standalone (closure compiled) is in dist/browser.js.

Keywords

FAQs

Package last updated on 03 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc