Content Slider Carousel
Modern content slider with smooth transitions, touch support, autoplay, and responsive design. Features navigation dots and arrow controls.
Responsive Design
Yes
Dark Mode Support
No
lines
426
Browser Compatibility
No
Live Preview
Interact with the component without leaving the page.
Overview
Modern content slider with smooth transitions, touch support, autoplay, and responsive design. Features navigation dots and arrow controls.
How to use
- Copy the HTML markup into your page.
- Paste the CSS into your stylesheet and ensure the selectors match your markup.
- Paste the JavaScript and load it after the markup.
- Adjust spacing, colors, and text to match your design system.
Customization tips
- Rename class names to avoid collisions with your existing CSS.
- Replace hard-coded colors with CSS variables for theming.
- Verify the layout at 320px, 768px, and 1024px widths.
HTML
81
lines
CSS
217
lines
JavaScript
128
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>