vue-flickity is a legacy Vue 2 component that provides a wrapper for the Flickity.js carousel library. It enables developers to integrate responsive, touch-friendly carousels into Vue 2 applications by exposing Flickity's configuration options via props and methods through component refs. Maintained at version 1.2.1 and last published seven years ago, this package is considered abandoned and is not compatible with Vue 3 or later versions. Its primary utility is for existing Vue 2 projects requiring Flickity integration, offering a convenient component-based API over direct Flickity instantiation. There is no ongoing development or planned updates.
npm install vue-flickityVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate `vue-flickity` into a Vue 2 application, configure it with various options, and implement custom navigation using component methods.
For new projects, consider modern, actively maintained carousel libraries for Vue 3+. For existing Vue 2 projects, proceed with caution and thorough testing.
Ensure your project is running Vue 2.x. If migrating to Vue 3, you must replace `vue-flickity` with a Vue 3-compatible carousel solution.
Add `import 'flickity/css/flickity.css';` to your main JavaScript file or link the CSS directly in your HTML.
After dynamic content updates, manually call `this.$refs.flickity.flickity.reloadCells()` or `this.$refs.flickity.flickity.resize()` to force Flickity to re-evaluate the layout.
This component is for Vue 2 only. Downgrade Vue to 2.x or switch to a Vue 3 compatible carousel library.
Ensure the `flickity` component has a `ref="flickity"` attribute and that you are calling methods only after the component has been mounted (e.g., in `mounted()` lifecycle hook or within a `v-if` check).
Import `flickity/css/flickity.css` in your project's main JavaScript file (e.g., `main.js`) or include it via a `<link>` tag in your HTML.