Lightweight fullpage Svelte component.
Makes scrolling pages by sections.
npm i svelte-fullpage -D
To make things clear:
<Fullpage>
is wrapper of its sections which can be scrolled vertically to navigate between sections<FullpageSection>
is section that takes entire viewport and optionally can be scrolled horizontally to navigate between slides<FullpageSlide>
analogy of section which is child of sectionimport { Fullpage, FullpageSection, FullpageSlide } from 'svelte-fullpage'
into desired page<Fullpage>
, if you need slides, make them too and put them into some <FullpageSection>
<FullpageSlide>
s and place them inside some <FullpageSection>
<script>
import {
Fullpage,
FullpageSection,
FullpageSlide
} from 'svelte-fullpage'
</script>
<Fullpage>
<FullpageSection title="Home">
...Your markup here
</FullpageSection>
<FullpageSection title="History">
<FullpageSlide title="1982-1993">
...Your markup here
</FullpageSlide>
<FullpageSlide title="1993-2006">
...Your markup here
</FullpageSlide>
<FullpageSlide title="2006-present">
...Your markup here
</FullpageSlide>
</FullpageSection>
<FullpageSection title="Present">
...Your markup here
</FullpageSection>
<FullpageSection title="Future">
...Your markup here
</FullpageSection>
</Fullpage>
If you are not sure how to use this component, take a look at demo site code
These are options for customizing your fullpage component. In addition to these props feel free to use HTML customization props such as class, style, ....
number
default: 750
- Duration of scroll and next scroll timeout in millisecondsnumber
default: 8
- Number which sets scroll sensitivity, bigger number,
less needed scrolling effort. n
means user have to make scroll delta 1/n
of viewport height/width in order to get to new page.boolean
default: false
- Disables pointer drag navigationboolean
default: false
- Disables navigation using arrow keysfunction
default: quartOut
- Custom easing function which will be applied to scrolling sections and slidesstring
default: sectionIndex
- Title of section displayed on hover effect on section indicatorstring
default: false
- Disabled flexbox centering of section's contentstring
default: sectionIndex
- Title of slide displayed on hover effect on slide indicatorstring
default: false
- Disabled flexbox centering of slide's contentThis component is under MIT license.