Skip to main content

Deceleration

The deceleration option sets the deceleration rate of inertial movement after a user flick. Higher values cause it to stop faster, while lower values make it travel farther.

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

// deceleration: 0.001 (long inertia)
new Flicking("#flick-low", {
  deceleration: 0.001,
  align: "center"
});

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

// deceleration: 0.05 (short inertia)
new Flicking("#flick-high", {
  deceleration: 0.05,
  align: "center"
});

Summary​

Key Options​

OptionTypeDefaultDescription
decelerationnumber0.0075Inertial movement deceleration rate

Comparison by Value​

ValueBehaviorSuitable For
0.001Slow deceleration, travels farFast browsing of long lists, freeScroll
0.0075Moderate deceleration (default)General carousels
0.05Fast deceleration, stops nearbyPrecise control, one panel at a time

Details​

How Deceleration Works​

When a user releases after dragging, inertial movement occurs based on the flick speed. deceleration determines the deceleration rate of this inertia.

// Low value: inertia lasts longer, travels far
deceleration: 0.001

// Default: moderate inertia
deceleration: 0.0075

// High value: stops quickly
deceleration: 0.05

Physical Meaning​

deceleration is similar to a friction coefficient. The larger the value, the stronger the friction causing it to stop quickly; the smaller the value, the farther it slides.

  • Relationship with moveType: The deceleration effect is more pronounced with moveType: "freeScroll". In "snap" mode, the difference may be less noticeable since it moves to a snap position.
  • Relationship with duration: deceleration determines the inertial movement distance, while duration determines the snap animation time.

Use Cases​

When to use?
  • Low value (0.001-0.005): Fast scrolling through long lists, freeScroll mode
  • Default (0.0075): General carousels, image galleries
  • High value (0.01-0.05): When precise control is needed, one panel at a time

Notes​

Extreme values caution

Very low values (close to 0) give a feeling of endless scrolling, while very high values may make it feel like flick gestures are being ignored.

  • moveType: Movement behavior mode (effect is more pronounced with freeScroll)
  • duration: Snap animation time