PetalComponents.Pagination (petal_components v3.0.1)
View SourcePagination is the method of splitting up content into discrete pages. It specifies the total number of pages and inidicates to a user the current page within the context of total pages.
Summary
Functions
In the path
param you can specify :page as the place your page number will appear.
e.g "/posts/:page" => "/posts/1"
Functions
In the path
param you can specify :page as the place your page number will appear.
e.g "/posts/:page" => "/posts/1"
Attributes
path
(:string
) - page path. Defaults to"/:page"
.class
(:any
) - parent div CSS class. Defaults tonil
.link_type
(:string
) - Defaults to"a"
.event
(:boolean
) - whether to usephx-click
events instead of linking. Enabling this will disablelink_type
andpath
. Defaults tofalse
.target
(:any
) - the LiveView/LiveComponent to send the event to. Example:@myself
. Will be ignored ifevent
is not enabled. Defaults tonil
.total_pages
(:integer
) - sets a total page count. Defaults tonil
.current_page
(:integer
) - sets the current page. Defaults tonil
.sibling_count
(:integer
) - sets a sibling count. Defaults to1
.boundary_count
(:integer
) - sets a boundary count. Defaults to1
.show_boundary_chevrons
(:boolean
) - whether to show prev & next buttons at boundary pages. Defaults tofalse
.- Global attributes are accepted.