Category · Interactive Difficulty Level · Advanced Published on · January 21, 2024
Content Slider Carousel
Modern content slider with smooth transitions, touch support, autoplay, and responsive design. Features navigation dots and arrow controls.
#carousel #slider #responsive #touch #autoplay
Responsive Design
Yes
Dark Mode Support
No
lines
430
Browser Compatibility
No
Live Preview
Interact with the component without leaving the page.
HTML
81
lines
CSS
217
lines
JavaScript
132
lines
<div class="slider-demo">
<div class="slider-container">
<div class="slider-header">
<h2>Featured Projects</h2>
<p>Swipe or use controls to navigate</p>
</div>
<div class="slider-wrapper">
<div class="slider-track">
<div class="slide active">
<div class="slide-content">
<div class="slide-image">
<img src="https://images.unsplash.com/photo-1551650975-87deedd944c3?w=800&h=400&fit=crop" alt="Project 1">
<div class="slide-overlay">
<h3>E-commerce Platform</h3>
<p>Modern shopping experience with React and Node.js</p>
<div class="slide-tags">
<span class="tag">React</span>
<span class="tag">Node.js</span>
<span class="tag">MongoDB</span>
</div>
</div>
</div>
</div>
</div>
<div class="slide">
<div class="slide-content">
<div class="slide-image">
<img src="https://images.unsplash.com/photo-1461749280684-dccba630e2f6?w=800&h=400&fit=crop" alt="Project 2">
<div class="slide-overlay">
<h3>Analytics Dashboard</h3>
<p>Real-time data visualization with D3.js</p>
<div class="slide-tags">
<span class="tag">D3.js</span>
<span class="tag">WebSocket</span>
<span class="tag">PostgreSQL</span>
</div>
</div>
</div>
</div>
</div>
<div class="slide">
<div class="slide-content">
<div class="slide-image">
<img src="https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=800&h=400&fit=crop" alt="Project 3">
<div class="slide-overlay">
<h3>Mobile App</h3>
<p>Cross-platform solution with React Native</p>
<div class="slide-tags">
<span class="tag">React Native</span>
<span class="tag">Firebase</span>
<span class="tag">Redux</span>
</div>
</div>
</div>
</div>
</div>
</div>
<button class="slider-btn prev" onclick="slideCarousel(-1)">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M15 18L9 12L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
<button class="slider-btn next" onclick="slideCarousel(1)">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M9 18L15 12L9 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
<div class="slider-dots">
<span class="dot active" onclick="currentSlide(1)"></span>
<span class="dot" onclick="currentSlide(2)"></span>
<span class="dot" onclick="currentSlide(3)"></span>
</div>
</div>
</div>