Title placeholder

Title placeholderTitle placeholder

import React, { useState, useEffect } from 'react'; import { ChevronLeft, ChevronRight } from 'lucide-react'; const ImageCarousel = () => { const [currentIndex, setCurrentIndex] = useState(0); const images = [ "/api/placeholder/800/400", "/api/placeholder/800/400", "/api/placeholder/800/400" ]; const nextSlide = () => { setCurrentIndex((prevIndex) => prevIndex === images.length - 1 ? 0 : prevIndex + 1 ); }; const prevSlide = () => { setCurrentIndex((prevIndex) => prevIndex === 0 ? images.length - 1 : prevIndex - 1 ); }; useEffect(() => { const timer = setInterval(() => { nextSlide(); }, 5000); return () => clearInterval(timer); }, []); return (
{images.map((src, index) => ( {`Slide ))}
{images.map((_, index) => (
))}
); }; export default ImageCarousel;

Ganz Produkte.

Entdecken Sie alle Projekte und treffen Sie sich mit allen Nutzern, die HW wählen

Ganz Produkte.+