Fullpage Scroll
Combine the moveType: "strict", bound, and align options to build a fullpage scroll UI.
- JavaScript
- React
- Vue@3
Summary
Key Options
| Option | Type | Value | Role |
|---|---|---|---|
moveType | string | "strict" | Move only one page at a time |
bound | boolean | true | Prevent empty space at both ends |
align | string | "prev" | Align pages to the viewport start |
horizontal | boolean | false | Vertical scrolling |
Direction Comparison
| Direction | horizontal | Result | Required Setting |
|---|---|---|---|
| Vertical (Fullpage) | false | Swipe up/down | Height must be set on viewport |
| Horizontal (Slider) | true | Swipe left/right | Default behavior |
Details
Role of moveType: "strict"
moveType: "strict" ensures that no matter how hard you swipe, only exactly one panel (one page) moves at a time. This is the key to fullpage scroll — "snap" (the default) can skip multiple panels depending on swipe strength, making it unsuitable for fullpage.
Vertical Direction Setup
Setting horizontal: false enables vertical scrolling. In this case, you must specify a height (height) on the viewport element. Use 100vh for fullscreen, or a fixed height for a specific area.
Related Options
moveTypeis the key: Only"strict"guarantees exactly 1-page movement- Combination with
bound: Prevents empty space from showing on the last page - Combination with
align: "prev": Aligns each page flush with the viewport start
Use Cases
When should you use this?
- Landing pages: Fullpage transitions between sections
- Presentation views: Slide navigation
- Mobile app onboarding: Step-by-step introduction screens
Notes
Caution
- For vertical direction (
horizontal: false),heightmust be set on the viewport. Without it, the height becomes 0 and nothing will be visible. - Vertical scrolling may conflict with the browser's default scroll. Using
preventDefaultOnDrag: truetogether resolves this.
Related Links
Related Options
moveType: Movement typebound: Boundary restrictionhorizontal: Scroll directionpreventDefaultOnDrag: Prevent default behavior on drag
Related Demos
- Movement Types: Detailed comparison of moveType options
- Carousel: Other option combination patterns