Skip to content
Pagination - Web Component
The Pagination component can be used imported from:
Playground
Parameters
The Web component uses the <z-pagination>
tag:
By default, all the parameters are optional or can be set in different, except for the ones marked as required
The parametrization of the component can be done with the following custom HTML params:
Name | Type | Description | Slot | A11y |
---|---|---|---|---|
pages [required] | number | Total number of pages | ||
model | number | Current page number | ||
show-edges | boolean | Show first and last page buttons | ||
disabled | boolean | Blocks user interaction with the component |
Events
This component has events. Check the documentation about how to use the events.
Name | Payload | Description |
---|---|---|
change | number | Returns the new value of the "value" attribute |
restarted | void | Emitted on value reset |
Slots
This component has slots. Check the documentation about how to use the slots.
Name | Tags | Description |
---|
Parameters use
pages
The pages
parameter is used to set the number of pages that the pagination will have.
model
The value
parameter is used to set the current page of the pagination.
Flags
show-edges
The show-edges
parameter is used to set the visibility of the first and last pages.
disabled
The disabled
parameter is used to block the interaction with the component.
Methods
reset()
We can all the reset()
method of the WebComponent in order to reset the value. This will clean the internal states and emit the nullable value with the change
event, plus a restarted
event:
In this example, the button triggers the method:
Value:
1
The reset is done to 1
.
Browser support
Detected engine:
Chromium
Webkit
Gecko