Pagination

The b.Pagination constructor creates a pagination.

ModifierAction
b.CenteredCenter the pagination list ("Previous" button on the left side, "Next" on the right side)
b.RightAlign the pagination list to the right ("Previous" and "Next" buttons on the left side)
b.RoundedHave rounded pagination buttons
b.SmallSet size to small
b.MediumSet size to medium
b.LargeSet size to large
ChildAction
b.OnList(...any)Apply children to the <ul class="pagination-list"> element
b.PaginationLink(...any)Add button-looking link to the <ul class="pagination-list"> element
b.PaginationEllipsis(...any)Add ellipsis to the <ul class="pagination-list"> element
Anything elseApply child to the <nav class="pagination"> element

The b.PaginationPrevious and b.PaginationNext constructors create button-looking links.

The b.PaginationLink and b.PaginationAHref constructors create button-looking links for the pagination list section.

ModifierAction
b.CurrentMark this link as being the current page
b.DisabledMark this link as inactive

The b.PaginationEllipsis constructor creates an ellipsis for the pagination list section.

Bulma examples

Example
ResultHTML
Code
b.Pagination(
	b.PaginationPrevious("Previous"),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Goto page 1"), "1"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 45"), "45"),
	b.PaginationLink(e.AriaLabel("Goto page 46"), b.Current, "46"),
	b.PaginationLink(e.AriaLabel("Goto page 47"), "47"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 86"), "86"),
)
Example
ResultHTML
Code
b.Pagination(
	b.PaginationPrevious(b.Disabled, "Previous", e.TitleAttr("This is the first page")),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Page 1"), b.Current, "1"),
	b.PaginationLink(e.AriaLabel("Goto page 2"), "2"),
	b.PaginationLink(e.AriaLabel("Goto page 3"), "3"),
)
Example
ResultHTML
Code
b.Pagination(
	b.Centered,
	b.PaginationPrevious("Previous"),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Goto page 1"), "1"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 45"), "45"),
	b.PaginationLink(e.AriaLabel("Goto page 46"), b.Current, "46"),
	b.PaginationLink(e.AriaLabel("Goto page 47"), "47"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 86"), "86"),
)
Example
ResultHTML
Code
b.Pagination(
	b.Right,
	b.PaginationPrevious("Previous"),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Goto page 1"), "1"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 45"), "45"),
	b.PaginationLink(e.AriaLabel("Goto page 46"), b.Current, "46"),
	b.PaginationLink(e.AriaLabel("Goto page 47"), "47"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 86"), "86"),
)

Styles

Example
ResultHTML
Code
b.Pagination(
	b.Rounded,
	b.PaginationPrevious("Previous"),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Goto page 1"), "1"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 45"), "45"),
	b.PaginationLink(e.AriaLabel("Goto page 46"), b.Current, "46"),
	b.PaginationLink(e.AriaLabel("Goto page 47"), "47"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 86"), "86"),
)

Sizes

Example
ResultHTML
Code
b.Pagination(
	b.Small,
	b.PaginationPrevious("Previous"),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Goto page 1"), "1"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 45"), "45"),
	b.PaginationLink(e.AriaLabel("Goto page 46"), b.Current, "46"),
	b.PaginationLink(e.AriaLabel("Goto page 47"), "47"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 86"), "86"),
)
Example
ResultHTML
Code
b.Pagination(
	b.Medium,
	b.PaginationPrevious("Previous"),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Goto page 1"), "1"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 45"), "45"),
	b.PaginationLink(e.AriaLabel("Goto page 46"), b.Current, "46"),
	b.PaginationLink(e.AriaLabel("Goto page 47"), "47"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 86"), "86"),
)
Example
ResultHTML
Code
b.Pagination(
	b.Large,
	b.PaginationPrevious("Previous"),
	b.PaginationNext("Next page"),
	b.PaginationLink(e.AriaLabel("Goto page 1"), "1"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 45"), "45"),
	b.PaginationLink(e.AriaLabel("Goto page 46"), b.Current, "46"),
	b.PaginationLink(e.AriaLabel("Goto page 47"), "47"),
	b.PaginationEllipsis(),
	b.PaginationLink(e.AriaLabel("Goto page 86"), "86"),
)