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

animatable-jsx

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

animatable-jsx

This extension package of animatable-js allows for easy and lightweight implementation of linear or curved animations in a JSX/TSX environment.

  • 1.0.0-alpha2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

Animatable JSX Package

Versionv1.0.0-alpha2

Introduction

This extension package of animatable-js allows for easy and lightweight implementation of linear or curved animations in a JSX/TSX environment.

Install by NPM

To install this package in your project, enter the following command.

When you want to update this package, enter npm update animatable-jsx --save in the terminal to run it.

npm install animatable-js, animatable-jsx

How to animate a value to the desired.

This can be resolved using the provided useAnimation or useAnimationController hooks in this package.

export function Root() {
  // is given a current value, an animation instance.
  const [value, animation] = useAnimation(1000);

  useEffect(() => {
      animation.animateTo(1);
  }, []);

  return <h1>Hello, World! {value}</h1>
}

About provided hooks.

The hooks initializes an animation instance and provides an updated animation value over time. It also ensures proper cleanup of the animation when the component is unmounted.

useAnimation()

A custom hook for handling animations.

const [value, instance] =  useAnimation(duration,curve?, initialValue? = 0);

useAnimationController()

A custom hook for handling raw animations.

const [value, instance] =  useAnimationController(
  duration,
  lowerValue? = 0,
  upperValue? = 1,
  initialValue? = lowerValue
);

Keywords

FAQs

Package last updated on 05 Sep 2024

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