npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

paginate-vuejs

v1.0.10

Published

Paginate Vuejs is a Vue.js pagination component that provides customizable pagination styles.

Downloads

26

Readme

Paginate Vuejs

Uniflapp - paginate-vuejs npm version npm downloads License

NPM

Note: This version only works with Vue 3


Pagination

The Pagination component allows the user to choose a particular page from a selection of pages.

Basic pagination

Basic pagination

Outlined pagination

Outlined pagination

Rounded pagination

Rounded pagination

Show buttons

You can optionally enable first-page and last-page buttons.

Show buttons

Hide buttons

You can optionally disable the previous-page and next-page buttons.

Hide buttons

Custom icons

It's possible to customize the control icons.

Custom icons

Pagination ranges

You can specify how many digits to display either side of current page with the siblingCount prop, and adjacent to the start and end page number with the boundaryCount prop.

Pagination ranges

Pagination API

Explore the API reference documentation for the Vuejs Pagination component, where you can discover information regarding its props, classes, and other available APIs.

Demos

This is a simple Demo environment for the package where you can use and test the package.

Import

App.vue

<script setup>
// Import the package
import { Pagination } from "paginate-vuejs";

// Import the CSS file to apply the default styling.
import 'paginate-vuejs/dist/style.css';

const clickCallback = (pageNum) => {
  // Add your code here
};
</script>

<template>
  <Pagination :total="100" :clickHandler="clickCallback" />
</template>

OR

main.js

import { createApp } from 'vue';
import App from './App.vue';

// Import the package
import Pagination from 'paginate-vuejs';

// Import the CSS file to apply the default styling.
import 'paginate-vuejs/dist/style.css';

// Register the package
createApp(App).use(PaginateVuejs).mount('#app');

import { Pagination } from "paginate-vuejs";

App.vue

<script setup>
const clickCallback = (pageNum) => {
  // Add your code here
};
</script>

<template>
  <Pagination :total="100" :clickHandler="clickCallback" />
</template>

Props

Component Attributes

| Name | Type | Default | Description| |-------------------|-----------------------------------------------|------------|------------| | total | integer | ___ | The total count of pages is required.| | perPage | bool | 10 | The number of items or records displayed on each page.| | currentPage | integer | 1 | The current page active.| | siblingCount | integer | 1 | Number of always visible pages before and after the current page.| | boundaryCount | integer | 1 | Number of always visible pages at the beginning and end.| | hideNextButton | bool | false | If true, hide the next-page button.| | hidePrevButton | bool | false | If true, hide the previous-page button.| | showFirstButton | bool | false | Show the First button.| | showLastButton | bool | false | Show the Last button.| | clickHandler | func | ___ | Callback fired when the page is changed. function(page: number) => void page The page selected.| | type | 'link' \| 'button' | 'button' | HTML Element type of the pagination component.| | linkUrl | string | '#' | Necessary when the type attribute is configured as 'link' and should include the "{page}" placeholder for it to be substituted with the actual page number when rendering.| | disablePagination | bool | false | Toggle the buttons for the entire component on/off.| | disablePagination | bool | false | Toggle the buttons for the entire component on/off.| | paginationTypes | 'normal' \| 'standard' \| 'minimal' \| 'of' | normal | The style of pagination to be applied ('normal', 'standard', 'minimal', or 'of').|

Class Name Attributes

| Name | Default | Description | |-------------------|---------------------|---------------------------------------| | pageContainerClass| 'pagination-container' | Styles applied to the component's container. | | pageItemClass | 'page-item' | Styles applied to individual page items. | | pageLinkClass | 'page-link' | Styles applied to page links. | | activeClass | 'active' | Styles applied to the currently active page. | | ellipsisClass | 'pagination-ellipsis' | Styles applied to the ellipsis indicator. |

Slot Names

These slot names can be utilized for Vue Slots to insert custom HTML into the specified element.

| Name | Target | |---------------|---------------------| | firstBtn | First page button | | lastBtn | Last page button | | prevBtn | Previous page button| | nextBtn | Next page button | | ellipsisText | Ellipsis indicator |

Author

Dadda Abdelghafour

License

The MIT License