A simple and lightweight JavaScript library for fullpage scrolling.
npm install @xy.dev/fullpage-scroll@0.0.1
// Vue
<script>
import FullPageScroll from '@xy.dev/fullpage-scroll';
export default {
name: 'App',
mounted() {
const sections = document.querySelectorAll('.section');
new FullPageScroll(sections);
}
}
</script>
// React
import { useEffect } from 'react';
import SectionScroll from '@xy.dev/section-scroll';
function App() {
useEffect(() => {
const sections = document.querySelectorAll('.section');
new FullPageScroll(sections);
}, []);
return (
<section></section>
);
}