SSPaging is a lightweight server-side (or low-level) pagination library for Vue.js. The name is derived from **Smartscore Pagination, a previous project by its creator. It offers ready-to-use functions and reactive properties to simplify pagination. Built-in components are available for quick integration, while custom implementations can be built using the provided examples.
Install SSPaging via NPM:
npm install ss-paging-vue
Starting from v3.x, SSPaging uses a unified codebase for both the Composition API and Pinia versions. This changes how the state is accessed.
- In v2.x, Pinia users could access the state directly using
paging.rows
. - In v3.x, it must be accessed via
paging.state.rows
.
After installation, import either the composable or Pinia version of SSPaging, depending on your preferred state management approach:
import { usePaging, usePagingStore } from 'ss-paging-vue'
// Using composables
const paging = usePaging()
// Using Pinia
const paging = usePagingStore()
To use SSPaging without a build tool, include it via CDN:
<script src="https://unpkg.com/ss-paging-vue@latest/dist/ss-paging.dist.js"></script>
// In your JS file
const paging = SSPaging.usePaging()
For full documentation, visit the SSPaging Official Documentation.
Want to contribute? Feel free to submit a pull request for bug fixes or new features. 🚀