Skip to content

negrel/svelte-fullpage.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Svelte wrapper for the fullpage.js library.

Installation

npm install svelte-fullpage.js

Example

Live example here with source code

example gif

Basic example :

<script>
	import Fullpage from 'svelte-fullpage.js';

	const options = {
		navigation: true,
		responsiveWidth: 700,
		anchors: ['home', 'about-us', 'contact'],
		parallax: true,
		onLeave: function(origin, destination, direction){
			console.log("Leaving section" + origin.index);
		}
	}
</script>

<Fullpage {options}>
	<div class="section">Section 1</div>
	<div class="section">Section 2</div>
	<div class="section">Section 3</div>
</Fullpage>

🌠 Show Your Support

Please give a ⭐ if this project helped you!

📜 License

GPLv3 © Alexandre Negrel