1.0.3 • Published 1 year ago
serendipity-moon-carousel v1.0.3
Serendipity Moon Carousel
Serendipity Moon Carousel is a React component for creating beautiful and responsive image carousels using Swiper.
Installation
You can install the Serendipity Moon Carousel library via npm:
npm install serendipity-moon-carousel
Usage
import React from 'react';
import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/swiper-bundle.css';
import SerendipityMoonCarousel from 'serendipity-moon-carousel';
function YourComponent() {
const items = [
{ src: 'image1.jpg', alt: 'Image 1' },
{ src: 'image2.jpg', alt: 'Image 2' },
{ src: 'image3.jpg', alt: 'Image 3' },
];
return (
<SerendipityMoonCarousel items={items} />
);
}
export default YourComponent;
Props
- items: An array of objects representing the images to be displayed in the carousel. Each object should contain
src
(the image URL) andalt
(the image alternative text).
License
This project is licensed under the MIT License - see the LICENSE file for details.