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

typing-effect-ts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typing-effect-ts - npm Package Compare versions

Comparing version 1.3.4 to 1.3.5

2

package.json
{
"name": "typing-effect-ts",
"version": "1.3.4",
"version": "1.3.5",
"description": "A small TypeScript package that provides the ability to create a typing effect with one or multiple strings.",

@@ -5,0 +5,0 @@ "repository": {

@@ -16,3 +16,4 @@ # Typing Effect

Ceck the [Notes](#notes) section and [demo](https://ydernov.github.io/typing-effect/) for more information and examples.
Check the [Usage notes](#usage-notes) section and [demo](https://ydernov.github.io/typing-effect/) for more information and examples.
Or take a look at [dev notes](https://github.com/ydernov/typing-effect/blob/main/DEVNOTES.md).

@@ -480,6 +481,12 @@ ## Installation

## Notes
## Usage notes
### Timing
Don't expect exact timing in milliseconds. TypingEffect uses requestAnimationFrame, which usually calls its callback around every 16ms (sometimes longer if the website is busy (usually with JS)). This means the shortest reaction time is at least 16ms, so any timing you set will be rounded to the nearest bigger multiple of 16.
For instance, if you set `cursorBlinkRate` to 500ms, the cursor will actually blink every 512ms because 500 isn't divisible by 16, but 512 is.
### Layout shift
Important! If you are using TypingEffect as in the examples to set the content of some element, it's essential to remember the layout shift. See the [demo](https://ydernov.github.io/typing-effect#problem-layout-shift) for context.
It is bad UX practice since it causes content jitter, making it harder for people to process; therefore, it should be avoided. The simplest way is to check the maximum height of the container during the cycle and set it's `height` or `min-height` accordingly.
If this does not meet your requirements, refer to the solution in the demo for [layout shift](https://ydernov.github.io/typing-effect#problem-layout-shift) to understand how it can be dynamically resolved.
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