0.6.0 • Published 3 months ago

wc-horizontal-scroller v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Horizontal Scroller Web Component

npm

A web component for a horizontal scroller (carousel)

Install

$ npm i wc-horizontal-scroller

Usage

Firstly, you need to register the custom element.

import HorizontalScroller from "wc-horizontal-scroller";

window.customElements.define('horizontal-scroller', HorizontalScroller);

Then you can use it in your HTML. You must provide an ID for the element.

<horizontal-scroller id="foo">
    <div>Item 1</div>
    <div>Item 2</div>
</horizontal-scroller>

Fullscreen

By default, clicking on the element will expand it to cover most of the viewport. This can be disabled by adding the no-fullscreen attribute to the custom element.

A scrollerfullscreenenter event will be dispatched by the element when entering fullscreen, and scrollerfullscreenexit when exiting fullscreen. See index.html for an example usage.

License

This project is licensed under the MIT License.

0.6.0

3 months ago

0.5.0

4 months ago

0.4.0

5 months ago

0.3.0

9 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.3.2

9 months ago

0.3.1

9 months ago

0.3.3

9 months ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago