Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 5, 2026·2 min de lecture

Flickity — Touch-Responsive Carousel and Slider Library

A physics-based touch carousel library with flickable gestures, responsive layouts, and cell grouping. Handles galleries, product sliders, and content carousels.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Flickity
Commande d'installation directe
npx -y tokrepo@latest install ce1578ea-7890-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Flickity is a JavaScript carousel library that uses physics-based animations to create smooth, flickable touch interactions. Created by Metafizzy, it handles the complexity of responsive carousels, touch gestures, and accessibility out of the box. Developers choose it when they need a slider that feels natural on both desktop and mobile.

What Flickity Does

  • Creates horizontal carousels with smooth physics-based scrolling
  • Supports touch and flick gestures on mobile devices
  • Handles responsive cell sizing and grouping
  • Provides free-scroll mode, wrap-around, and auto-play options
  • Includes page dots, navigation arrows, and fullscreen support

Architecture Overview

Flickity uses a custom physics engine to simulate momentum and deceleration when users flick through slides. It measures cell positions at initialization and recalculates on resize for responsive behavior. The library manages its own animation loop using requestAnimationFrame. Events are dispatched for slide changes, settlement, and drag interactions.

Self-Hosting & Configuration

  • Install via npm, yarn, or include via CDN script tag
  • Initialize with HTML data attributes or JavaScript API
  • Configure wrap-around, auto-play interval, and friction values
  • Customize navigation controls with CSS
  • Works with lazy-loaded images via the imagesLoaded plugin

Key Features

  • Physics-based flickable touch gestures with momentum
  • Responsive design that adapts to container width changes
  • Cell grouping for showing multiple items per view
  • Free-scroll mode for continuous browsing
  • Accessible with keyboard navigation and ARIA attributes

Comparison with Similar Tools

  • Swiper — more features and framework integrations; larger bundle size
  • Splide — lightweight modern alternative with TypeScript support
  • Embla Carousel — headless architecture for custom designs; less opinionated
  • Slick — jQuery-dependent and no longer actively maintained
  • Glide.js — minimal slider focused on simplicity; fewer animation options

FAQ

Q: Does Flickity work with React or Vue? A: Flickity is a vanilla JS library. Community wrappers exist for React and Vue, though headless alternatives like Embla may be a better fit for component-based frameworks.

Q: Is Flickity free for commercial use? A: Flickity uses a dual license. It is free for open-source projects under GPLv3 and requires a commercial license for proprietary projects.

Q: Can I lazy-load images in slides? A: Yes. Use the imagesLoaded companion plugin to trigger layout recalculation after images load.

Q: How do I make the carousel responsive? A: Set cell widths with percentages in CSS. Flickity automatically recalculates positions on window resize.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires