1.1.8 • Published 29 days ago

@frankhoodbs/pagination-cmp v1.1.8

Weekly downloads
-
License
ISC
Repository
-
Last release
29 days ago

Pagination Component

Component that displays data in paged format and provides navigation between pages.

Componente che visualizza dati in un formato paginato e fornisce una navigazione tra le pagine.

Version License

API Reference

Props

NameTypeDescription
data-aria-labelstringThe aria label of the pagination nav element.
data-pagenumberThe controlled value of the current page.
data-pages-numbernumberNumber of pages in your pagination.
data-sibling-countnumberHow many sibling should be shown around the current page.
data-show-edgesbooleanWhen true indicates that the pagination always show first page, last page, and add ellipsis if needed.

Emit

NameValueDescription
@updatepage: numberEvent handler called when the page value changes.

Slots

NameDescription
page-firstScoped slot for an icon used to navigate to the first page.
page-prevScoped slot for an icon used to navigate to the previous page.
pageRequired. Scoped slot used for render the navigable pages rendered based on the configuration in input. Should slot a tag a or a tag button if you want the navigation through keyboard to work, you can also slot a router-link
page-nextScoped slot for an icon used to navigate to the next page.
page-lastScoped slot for an icon used to navigate to the last page.

CSS variables

NamedefaultDescription
--pagination-page-item-gap0.25remGap between page-item.
--pagination-page-item-width2.5remValue of page-item width.
--pagination-page-item-height2.5remValue of page-item height.
--pagination-page-item-bg-colortransparentValue of page-item background-color.
--pagination-page-item-color#000000Value of page-item color.
--pagination-page-item-border-width1pxValue of page-item border-width.
--pagination-page-item-border-stylesolidValue of page-item border-style.
--pagination-page-item-border-color#000000Value of page-item border-color.
--pagination-page-item-border-radius0.375remValue of page-item border-radius.
--pagination-page-item-transition-duration0.15sValue of page-item transition-duration.
--pagination-page-item-active-border-width1pxValue of page-item border-width when the page-item has class active.
--pagination-page-item-active-border-stylesolidValue of page-item border-style when the page-item has class active.
--pagination-page-item-active-border-color#000000Value of page-item border-color when the page-item has class active.
--pagination-page-item-active-bg-colortransparentValue of page-item background-color when the page-item has class active.
--pagination-page-item-active-color#000000Value of page-item color when the page-item has class active.
--pagination-page-item-disabled-border-width1pxValue of page-item border-width when the page-item has class disabled.
--pagination-page-item-disabled-border-stylesolidValue of page-item border-style when the page-item has class disabled.
--pagination-page-item-disabled-border-color#000000Value of page-item border-color when the page-item has class disabled.
--pagination-page-item-disabled-bg-colortransparentValue of page-item background-color when the page-item has class disabled.
--pagination-page-item-disabled-color#000000Value of page-item color when the page-item has class disabled.
--pagination-page-item-disabled-cursornot-allowedValue of page-item cursor when the page-item has class disabled.
--pagination-page-item-disabled-opacity0.333Value of page-item opacity when the page-item has class disabled.
--pagination-page-item-hover-border-width1pxValue of page-item border-width when the page-item is in hover status.
--pagination-page-item-hover-border-stylesolidValue of page-item border-style when the page-item is in hover status.
--pagination-page-item-hover-border-color#000000Value of page-item border-color when the page-item is in hover status.
--pagination-page-item-hover-bg-colortransparentValue of page-item background-color when the page-item is in hover status.
--pagination-page-item-hover-color#000000Value of page-item color when the page-item is in hover status.
--pagination-page-item-hover-opacity1Value of page-item opacity when the page-item is in hover status.

Usage/Examples

<pagination-cmp
  :data-page="page"
  :data-pages-number="pagesNumber"
  @update="page = $event"
>
  <template #page-first="{ disabled }">
    <a
      href="#"
      aria-label="First page"
      :tabindex="disabled ? '-1' : null"
    >
      <span aria-hidden="true">&laquo;</span>
    </a>
  </template>
  <template #page-prev="{ disabled }">
    <a
      href="#"
      aria-label="Previous page"
      :tabindex="disabled ? '-1' : null"
    >
      <span aria-hidden="true">&lsaquo;</span>
    </a>
  </template>
  <template #page="{ pageN }">
    <a href="#">{{ pageN }}</a>
  </template>
  <template #page-next="{ disabled }">
    <a
      href="#"
      aria-label="Next page"
      :tabindex="disabled ? '-1' : null"
    >
      <span aria-hidden="true">&rsaquo;</span>
    </a>
  </template>
  <template #page-last="{ disabled }">
    <a
      href="#"
      aria-label="Last page"
      :tabindex="disabled ? '-1' : null"
    >
      <span aria-hidden="true">&raquo;</span>
    </a>
  </template>
</pagination-cmp>

Screenshots

Component Screenshot

1.1.8

29 days ago

1.1.7

29 days ago

1.1.4

29 days ago

1.1.3

1 month ago

1.1.2

2 months ago

1.1.1

2 months ago

1.1.0

2 months ago

1.0.9

2 months ago

1.0.8

3 months ago

1.0.7

3 months ago

1.0.6

3 months ago

1.0.5

3 months ago

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago