| ID | Name | Country | |
|---|---|---|---|
| 1 | Laverna Kassulke | Gerhard_Mante7@hotmail.com | Andorra |
| 2 | Mr. Sanford Schmidt-Koepp | Jovanny.Ryan56@hotmail.com | Namibia |
| 3 | Tyrel Hessel | Maiya.Halvorson@yahoo.com | Yemen |
| 4 | Charlotte Fritsch | Marlene9@gmail.com | Benin |
| 5 | Wilbert Ritchie | Bridget_Bergnaum56@gmail.com | Luxembourg |
Page Size
Implement a custom page pageSize amount using a select element.
| ID | Name | Country | |
|---|---|---|---|
| 1 | Laverna Kassulke | Gerhard_Mante7@hotmail.com | Andorra |
| 2 | Mr. Sanford Schmidt-Koepp | Jovanny.Ryan56@hotmail.com | Namibia |
| 3 | Tyrel Hessel | Maiya.Halvorson@yahoo.com | Yemen |
| 4 | Charlotte Fritsch | Marlene9@gmail.com | Benin |
| 5 | Wilbert Ritchie | Bridget_Bergnaum56@gmail.com | Luxembourg |
Direction
Set the text direction (ltr or rtl) using the dir prop.
| ID | Name | Country | |
|---|---|---|---|
| 1 | Laverna Kassulke | Gerhard_Mante7@hotmail.com | Andorra |
| 2 | Mr. Sanford Schmidt-Koepp | Jovanny.Ryan56@hotmail.com | Namibia |
| 3 | Tyrel Hessel | Maiya.Halvorson@yahoo.com | Yemen |
| 4 | Charlotte Fritsch | Marlene9@gmail.com | Benin |
| 5 | Wilbert Ritchie | Bridget_Bergnaum56@gmail.com | Luxembourg |
Total Count
For server-side pagination, your data source may be truncated. Make sure to specify the total records using count.
const res = {
"results": [...],
"pagination": {
"page": 1,
"limit": 10,
"count": 500,
}
}<Pagination
page={res.pagination.page}
count={res.pagination.count}
pageSize={res.pagination.limit}
>
<!-- ... -->
</Pagination>Anatomy
Here’s an overview of how the Pagination component is structured in code:
import { Pagination } from '@skeletonlabs/skeleton-react';
export default function Anatomy() {
return (
<Pagination>
<Pagination.FirstTrigger />
<Pagination.PrevTrigger />
<Pagination.Item />
<Pagination.Ellipsis />
<Pagination.NextTrigger />
<Pagination.LastTrigger />
</Pagination>
);
}<script lang="ts">
import { Pagination } from '@skeletonlabs/skeleton-svelte';
</script>
<Pagination>
<Pagination.FirstTrigger />
<Pagination.PrevTrigger />
<Pagination.Item />
<Pagination.Ellipsis />
<Pagination.NextTrigger />
<Pagination.LastTrigger />
</Pagination>API Reference
Unable to load component information for react/pagination
Unable to load component information for svelte/pagination