nuxt-x-blog
Pagination
Page navigation controls for the blog listing.
Pagination
The XBLPagination component renders previous/next buttons and page number controls. Used at the bottom of XBLPostList, but can also be placed standalone anywhere pagination is needed.
Components
<XBLPagination />
Emits a page-change event — the parent is responsible for updating the current page and re-fetching posts.
<XBLPagination
:page="page"
:total-pages="totalPages"
@page-change="page = $event"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
page | number | required | Currently active page number |
totalPages | number | required | Total number of pages |
Emits
| Event | Description |
|---|---|
page-change | Fired with the new page number when the user clicks a page control |
AI Context
component: XBLPagination
package: "@xenterprises/nuxt-x-blog"
use-when: Navigating between pages of blog post results
