Socket
Socket
Sign inDemoInstall

windups

Package Overview
Dependencies
4
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    windups

A unique typewriter effect library for React.


Version published
Weekly downloads
2.4K
increased by7.48%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

v1.2.0

  • Adds a new API for pausing and resuming windups! <WindupChildren> now has a isPaused prop; there are new usePause and useResume hooks, and useWindupString returns pause and resume callbacks. Thank you anulman!
  • Updates typings for compatibility with React 18. Thank you witchtrash!

Readme

Source

windups

🐸 Examples, guides, API docs, and more! Much of it presented by a talking frog!


A unique typewriter (or, ahem, "windup") effect library for React.

This effect can be applied to strings or pretty anything you can put in React's children prop.

What's it look like?

For strings:

import { useWindup } from "windups";

function MyWindup() {
  const [text] = useWindup(
    "This string will be rendered character by character!"
  );

  return <div>{text}</div>;
}

For pretty much everything else:

import { WindupChildren } from "windups";

function MyWindup() {
  return (
    <WindupChildren>
      {"It's fun to do"}
      <em>{"wild"}</em>
      {"stuff with text!"}
    </WindupChildren>
  );
}

There are additional APIs for:

  • Controlling the pacing of the text!
  • Adding pauses!
  • Firing effects (e.g. when each character is typed, or at arbitrary points)!
  • Ahead of render-time line-breaking!

Want to see a codebase that makes extensive, real-word use of this package? Source for the docs site is at https://github.com/sgwilym/windups-docs

Keywords

FAQs

Last updated on 14 Apr 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc