DaisyUIComponents.Pagination (DaisyUIComponents v0.9.3)
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) - additional class for the pagination button. Defaults tonil.size(:string) - Must be one of"xs","sm","md","lg", or"xl".target(:string) - the phx-target to send the event to. Defaults tonil.page_click_event(:string) - Event name to trigger when a page button is clicked. Defaults to"page_click".on_page_click(Phoenix.LiveView.JS) - JS event to trigger when a page button is clicked, if not usingpage_click_event. Defaults tonil.- Global attributes are accepted.