1.0.3 • Published 2 years ago

embla-carousel-snap-class v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Embla Carousel Snap Class

Snap Preview

Inspired by embla-carousel-class-names

A plugin for Embla Carousel that adds a class only to the snapped slide.

Setup

npm install embla-carousel-snap-class
import SnapClass from "embla-carousel-snap-class"

const emblaContainer = document.querySelector(".embla") as HTMLElement;
Embla(emblaContainer, {}, [SnapClass()]);

Options

The Plugin accepts the following options:

{
    <!-- Changes the name of the class added to the snapped slide -->
    className: string
}
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago