bs_pagination {bsTools}R Documentation

Create a Bootstrap pagination nav

Description

Create a Bootstrap pagination nav

Usage

bs_pagination(
  items = list(),
  ul_class = "pagination",
  li_class = "page-item",
  a_class = "page-link"
)

Arguments

items

A list, creates nav elements. If a list item is named, names should be links and values should be text to display in the pagination bar for that link. Names will be passed to the href param and values to the main content of the html5::a() function which will be wrapped by the html5::li() function, each of which have Bootstrap classes added by default.If an item in the list is not named, the item must be valid HTML with appropriate Bootstrap classes added manually.

ul_class

A string, default class used for the "ul" tag wrapping the nav elements.

li_class

A string, default class used for the "li" tags wrapping the nav elements if the input list item is named.

a_class

A string, default class used for the "a" tags wrapping the nav elements if the input list item is named.

Value

A string of HTML.

Examples

bs_pagination(
items = list(
  "#" = "Previous",
  "#" = "1",
  "#" = "2",
  "#" = "3",
  "#" = "Next"
)
)

[Package bsTools version 0.1.0 Index]