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

react-transitions-library

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-transitions-library - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

transitions/zoom-in-transition/README.md

2

package.json
{
"name": "react-transitions-library",
"version": "1.2.0",
"version": "1.2.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,1 +5,66 @@ # React-Transitions-Library

* [FadeInTransition](transitions/fade-in-transition/README.md)
* [ZoomInTransition](transitions/zoom-in-transition/README.md)
## Examples
### Single Transition
```tsx
const Example = () => {
const [show, setShow] = useState(false);
return (
<div>
<FadeInTransition timeout={400} from={0} to={1}>
React Transitions Library
</FadeInTransition>
<button onClick={() => setShow(true)}>in</button>
<button onClick={() => setShow(false)}>out</button>
</div>
);
}
```
### Combined Transition
```tsx
const Example = () => {
const [show, setShow] = useState(false);
return (
<div>
<FadeInTransition in={show} timeout={400} from={0} to={1}>
<ZoomInTransition in={show} from={0.8} to={1} timeout={400}>
<h1>React Transitions Library</h1>
</ZoomInTransition>
</FadeInTransition>
<button onClick={() => setShow(true)}>in</button>
<button onClick={() => setShow(false)}>out</button>
</div>
);
}
```
### Transition Group
Transition on mount and on unmount.
```tsx
const FadeInZoomInTransition = ({ children, ...props }) => (
<FadeInTransition {...props} timeout={400} from={0} to={1}>
<ZoomInTransition {...props} from={0.8} to={1} timeout={400}>
{children}
</ZoomInTransition>
</FadeInTransition>
);
const Example = () => {
const [show, setShow] = useState(false);
return (
<div>
<TransitionGroup>
{show ? (
<FadeInZoomInTransition key={"FadeInZoomInTransition"}>
<h1>React Transitions Library</h1>
</FadeInZoomInTransition>
) : null}
</TransitionGroup>
<button onClick={() => setShow(true)}>in</button>
<button onClick={() => setShow(false)}>out</button>
</div>
);
}
```
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