DaisyUIComponents.Pagination (DaisyUIComponents v0.8.6)
View SourceButton Group component
Summary
Functions
Returns a list of display buttons for pagination based on the current page, page size, and total entries.
Renders a button group.
Functions
Returns a list of display buttons for pagination based on the current page, page size, and total entries.
Parameters
- page - the current page number.
- page_size - the number of entries per page.
- total_entries - the total number of entries available.
Description
Calculates which page numbers to display as buttons in a pagination control.
Renders a button group.
Examples
<.pagination page={1} page_size={10} total_entries={100} />
Attributes
page
(:integer
) - Defaults to1
.page_size
(:integer
) - Defaults to10
.total_entries
(:integer
) - Defaults to100
.button_class
(:string
) - Defaults tonil
.size
(:string
) - Must be one of"xs"
,"sm"
,"md"
,"lg"
, or"xl"
.target
(:string
) - Defaults tonil
.page_click_event
(:string
) - Defaults to"page_click"
.- Global attributes are accepted.