PageNumbersMixin

Adds a page number and total page count to a carousel-like element

Overview

This can be applied to components like Carousel that renders their content as pages.

API

The element defines the following shadow parts:

  • page-number: the page number, default type is div element

wrap(target) method

Destructively wrap a node with elements to show page numbers.

Parameters:

  • target: Elementthe element that should be wrapped by page numbers