Skip to main content

Gelly Element

Wrap content in <GellyElement></GellyElement>:

import { ScrollContainer, GellyElement } from 'react-nice-scroll';
import 'react-nice-scroll/dist/styles.css';

const Index = () => {
return (
<ScrollContainer>
<section
style={{
height: '300vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<GellyElement>
<div style={{ height: '300px', width: '300px', backgroundColor: '#000' }} />
</GellyElement>
</section>
</ScrollContainer>
);
};

export default Index;

Demo

Check demo.

GellyElement Props

PropsValue TypeDefault Value
intensitynumber-400
minnumber-40
maxnumber40
triggergsap.DOMTarget | string | undefinedundefined
startstringtop bottom
endstringbottom top
axisskewX | skewYskewY
durationnumber0.3
easestringexpo.out