Socket
Socket
Sign inDemoInstall

react-smooth

Package Overview
Dependencies
83
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-smooth

react animation library


Version published
Maintainers
1
Created

Package description

What is react-smooth?

The react-smooth package provides a set of tools to implement smooth animations in React applications. It allows developers to animate the appearance, disappearance, and property changes of components with ease. The package offers a high-level API for common animations, making it straightforward to add smooth transitions without delving into the complexities of animation libraries.

What are react-smooth's main functionalities?

Fade In Animation

This feature allows elements to fade in smoothly. The `fadeIn` component wraps any content that should appear with a fading effect.

import { fadeIn } from 'react-smooth';

function FadeInExample() {
  return (
    <fadeIn>
      <div>Content to fade in</div>
    </fadeIn>
  );
}

Animate on Property Change

This feature enables animation between different states based on property changes. The `Animate` component is used to transition between a start and end state, such as changing the opacity.

import { Animate } from 'react-smooth';

function AnimateOnChangeExample() {
  return (
    <Animate start={{ opacity: 0 }} end={{ opacity: 1 }}>
      <div>Content that changes opacity</div>
    </Animate>
  );
}

Other packages similar to react-smooth

Changelog

Source

0.0.1 / 2016-01-21

  • Init the project

Readme

Source

react-smooth

react-smooth is a animation library work on React.

npm version build status

install

npm install --save react-smooth

Usage

<Animate to="0" attributeName="opacity">
  <div />
</Animate>

or

const steps = [{
  style: {
    opacity: 0,
  },
  moment: 400,
}, {
  style: {
    opacity: 1,
    transform: 'translate(0, 0)',
  },
  moment: 1000,
}, {
  style: {
    transform: 'translate(100px, 100px)',
  },
  moment: 1200,
}];
<Animate steps={steps}>
  <div />
</Animate>

API

props

nametypedefaultdescription
fromstring or object''set the initial style of the children
tostring or object''set the final style of the children
canBeginbooleantruewhether the animation is start
beginnumber0animation delay time
durationnumber1000animation duration
stepsarray[]animation keyframes
onAnimationEndfunction() => {}called when animation finished
attributeNamestring''style property
easingstring'ease'the animation timing function, support css timing function temporary
isActivebooleantruewhether the animation is active
childrenelementsupport only child temporary

License

MIT

Copyright (c) 2015-2016 Recharts Group

Keywords

FAQs

Last updated on 28 Jan 2016

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