<baht-pagination>
Server-side pagination control. Never slices data; the host fetches on baht-page-change.
Numbered
Events (name)
<baht-pagination page="5" total-pages="20"></baht-pagination>Compact
Events (name)
<baht-pagination page="4" total-pages="20" variant="compact"></baht-pagination>Cursor
Events (name)
<baht-pagination variant="cursor" has-next="true" has-prev="true"></baht-pagination>| Name | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Current page |
total-pages | number | 1 | Total pages |
variant | 'numbered' | 'compact' | 'cursor' | 'numbered' | Display style (numbered | compact | cursor) |
siblings | number | 1 | Numbered pages beside current |
has-next | boolean | false | cursor variant only |
has-prev | boolean | false | cursor variant only |
Events
Section titled “Events”| Event | detail | Description |
|---|---|---|
name | CustomEvent | |
baht-page-change | { page } | User wants this page |
baht-cursor-change | { direction: 'next'|'prev' } | cursor variant: user wants that direction |