1.2.0 • Published 2 years ago

genk-interactive-carousel v1.2.0

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

Interactive carousel built with Lit-Element. This webcomponent follows the open-wc recommendation.

Installation

npm install genk-interactive-carousel --save

Built With

Usage

<script type="module">
  import 'genk-interactive-carousel/genk-interactive-carousel.js';
</script>

<genk-interactive-carousel>
  <p>First slide</p>
  <p>Second slide</p>
  <p>Third slide</p>
  <p>Fourth slide</p>
</genk-interactive-carousel>

Properties

  • slideIndex: Number that indicates the current active slide
  • animations: Object with the animations in Web Animation API Format, see src/animations.js for more details.
const SLIDE_LEAVE = [
  SLIDE_LEAVE_KEYFRAMES,
  SLIDE_LEAVE_OPTS
];
const SLIDE_ENTER = [
  SLIDE_ENTER_KEYFRAMES,
  SLIDE_ENTER_OPTS
];

const ANIMATIONS = {
  slideEnter: SLIDE_ENTER,
  slideLeave: SLIDE_LEAVE
};

Events

  • genk-ic-next: dispatched when slide change to next one ➡️
  • genk-ic-prev: dispatched when slide change to previous one ⬅️

Linting

To scan the project for linting and formatting errors, run

npm run lint

To automatically fix linting and formatting errors, run

npm run format

Testing

To execute a single test run:

npm run test

To run the tests in interactive watch mode run:

npm run test:watch

Tooling configs

For most of the tools, the configuration is in the package.json to minimize the amount of files in your project.

If you customize the configuration a lot, you can consider moving them to individual files.

Local Demo

npm run start

Contact

Pablo Álamo - LinkedIn - pabloalamovargas@gmail.com

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago