Skip to content

The carousel showcases a set of images and provides various features like pagination, navigation, and coverflow effect.

License

Notifications You must be signed in to change notification settings

dina-the-developer/react-carousel-with-swiper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Carousel with Swiper

This is a React component that implements a carousel using Swiper, a powerful and flexible touch-enabled slider library. The carousel showcases a set of images and provides various features like pagination, navigation, and coverflow effect.

Installation

To use this carousel component in your React project, you need to have the following prerequisites:

Node.js (v12 or higher) npm (Node Package Manager)

npm install swiper
npm install swiper/react

Next, copy the code for the Carousel component into your project.

Usage

To use the Carousel component, import it into your React application and use it as follows:

import React from 'react';
import { Carousel } from './Carousel';

const App = () => {
  return (
    <div>
      {/* Your other components */}
      <Carousel />
      {/* Your other components */}
    </div>
  );
};

export default App;

Features

The Carousel component comes with the following features:

  • Coverflow Effect: The carousel displays images with a stunning coverflow effect, giving it a 3D-like appearance.
  • Pagination: You can navigate through the slides using the pagination dots.
  • Navigation: You can also use the navigation arrows (prev/next) to switch between slides.
  • Looping: The carousel loops infinitely, so after reaching the last slide, it will jump back to the first one.

Customization

The Carousel component can be easily customized to fit your specific needs. Here are some of the ways you can customize it:

  • Images: Modify the slides array in the code to include your desired image URLs.
  • Coverflow Effect Options: Adjust the rotate, stretch, depth, modifier, and slideShadows properties in the coverflowEffect prop to control the appearance of the coverflow effect.
// Example of customizing the coverflow effect options
coverflowEffect={{
  rotate: 30,
  stretch: 50,
  depth: 300,
  modifier: 1,
  slideShadows: false,
}}
  • Swiper Options: You can explore other Swiper options and modules by referring to the Swiper documentation.

License

This project is licensed under the MIT License.

Acknowledgments

The Carousel component is powered by the fantastic Swiper library. We extend our gratitude to the Swiper team for providing such a great slider solution.

If you have any questions, feedback, or issues, please don't hesitate to submit an issue.

Enjoy using the Carousel component in your React project! Happy sliding! 😄

About

The carousel showcases a set of images and provides various features like pagination, navigation, and coverflow effect.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published