@cptdoraemon/parallax-container
v0.0.2
Published
A React component wrapper for parallax effect.
Readme
parallax-container
A React component wrapper for parallax effect.
Install
npm install --save @cptdoraemon/parallax-containerUsage
import * as React from 'react'
import ParallaxContainer from "parallax-container"
function WrappedComponent() {
return (
<div>
<h1>Title</h1>
<p>Contents</p>
</div>
)
}
interface AppProps {
backgroundUrl: string
}
function App(props: AppProps) {
return (
<ParallaxContainer backgroundUrl={props.backgroundUrl}>
<WrappedComponent />
</ParallaxContainer>
)
}Example
License
MIT © CptDoraemon
