Skip to main content

Movement Types

The moveType option controls panel movement and snap behavior. Three modes are available: snap, freeScroll, and strict.

import Flicking from "@egjs/flicking";
import "@egjs/flicking/dist/flicking.css";
import "./styles.css";

// moveType: "snap" (default)
new Flicking("#flick-snap", {
  moveType: "snap",
  align: "center"
});

// moveType: "freeScroll"
new Flicking("#flick-free", {
  moveType: "freeScroll",
  align: "center",
  bound: true
});

// moveType: "strict"
new Flicking("#flick-strict", {
  moveType: "strict",
  align: "center"
});

Summary

Key Options

OptionTypeDefaultDescription
moveType"snap" | "freeScroll" | "strict" | object"snap"Movement behavior mode

Comparison by Value

ValueBehaviorSuitable For
"snap"Snaps by panel unit. Can skip multiple panels depending on drag distanceGeneral carousels, image galleries
"freeScroll"Free scrolling without snapping. Inertia appliedHorizontal scroll lists, tab bars
"strict"Moves exactly one panel at a timeOnboarding, step-by-step guides, fullscreen sliders

Details

"snap" in Detail

This is the default. After dragging, it snaps to the nearest panel when released. Multiple panels can be skipped depending on drag speed and distance.

snap with count: You can limit the number of panels to move at once.

moveType: { type: "snap", count: 2 }  // Move up to 2 panels at a time

"freeScroll" in Detail

Moves freely like native scrolling without snapping to panels. Inertia based on drag speed is applied. The current panel index is determined by the panel closest to the center of the screen.

stopAtEdge option: Sets whether to stop at the boundary.

moveType: ["freeScroll", { stopAtEdge: true }]

"strict" in Detail

Moves exactly one panel per flick. No matter how fast you drag, only one panel moves at a time. Use when you need to prevent users from skipping content.

  • Relationship with bound: In freeScroll mode, it is recommended to use bound: true together. Otherwise, it may scroll beyond the boundaries.
  • Relationship with threshold: threshold is the minimum drag distance required for panel transition. Particularly important in strict mode.
  • Relationship with duration: Controls the duration of the snap animation.

Use Cases

When to use?
  • "snap": General carousels, image galleries, product sliders
  • "freeScroll": Horizontal scroll menus, tab bars, tag lists, UI that needs a native scroll feel
  • "strict": Onboarding screens, tutorials, step-by-step guides, preventing content skipping

Notes

When using freeScroll

freeScroll mode scrolls beyond boundaries by default. Set bound: true together to restrict the boundaries.

strict mode

strict mode restricts user freedom. Use only when sequential navigation is required, such as onboarding.

  • bound: Boundary restriction (recommended with freeScroll)
  • threshold: Minimum drag distance for panel transition
  • duration: Animation duration