embla-carousel-snap-class
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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
}

Readme

Keywords

none

Package Sidebar

Install

npm i embla-carousel-snap-class

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

3.78 kB

Total Files

4

Last publish

Collaborators

  • 4a541068d495ab570