imagium
v1.0.0
Published
A lightweight, customizable carousel/slider for modern web applications
Maintainers
Readme
Imagium 🖼️
A lightweight, customizable, and modern carousel/slider for web applications.
Features
- 🚀 Lightweight (less than 5KB gzipped)
- 📱 Touch-friendly & responsive
- ⌨️ Keyboard accessible
- 🎨 Customizable styling
- 🔧 TypeScript support
- 🎯 No dependencies
Installation
npm install imagium
Usage
<div id="myCarousel">
<div>Slide 1</div>
<div>Slide 2</div>
<div>Slide 3</div>
</div>
import { Imagium } from 'imagium';
const carousel = new Imagium(document.getElementById('myCarousel'), {
autoPlay: true,
showDots: true,
showArrows: true
});
Options
Option Type Default Description
autoPlay boolean true Enable auto-play
autoPlayDelay number 3000 Delay between slides (ms)
showDots boolean true Show navigation dots
showArrows boolean true Show navigation arrows
loop boolean true Infinite loop
dragEnabled boolean true Enable drag/swipe
Methods
next() - Go to next slide
prev() - Go to previous slide
goToSlide(index) - Go to specific slide
destroy() - Clean up