slideCounter
Overlay badge showing "2 / 5" in a corner of the slider. Useful for galleries.
Import
import { slideCounter } from '@andresclua/sliderkit-plugins' Usage
new Slider('#el', {
plugins: [
slideCounter({
template: ({ current, total }) => `${current} / ${total}`,
}),
],
}) Options
| Option | Type | Default | Description |
|---|---|---|---|
el | string | HTMLElement | — | Target element. Auto-created inside container if omitted. |
template | ({ current, total }) => string | 'current / total' | Custom format function. |