Module Solidtype_heroui.Pagination

HeroUI's Pagination: a <nav> of the pages an application lays out, each a button on Kobalte's Button, with HeroUI's classes from Styles.Pagination.

  <Pagination>
    <Pagination.Content>
      <Pagination.Item>
        <Pagination.Previous on_press=back>
          <Pagination.Previous_icon /> <span>"Previous"</span>
        </Pagination.Previous>
      </Pagination.Item>
      <Pagination.Item>
        <Pagination.Link is_active=true on_press=first>"1"</Pagination.Link>
      </Pagination.Item>
      <Pagination.Item>
        <Pagination.Next on_press=forward>
          <span>"Next"</span> <Pagination.Next_icon />
        </Pagination.Next>
      </Pagination.Item>
    </Pagination.Content>
  </Pagination>

It keeps no page of its own, as HeroUI's keeps none: which pages show, which is active and what a press does are the application's. Kobalte's Pagination keeps the page and draws its own items, which is not HeroUI's usage, so the parts are HeroUI's elements and its buttons Kobalte's.

A part is used inside a Pagination: elsewhere it raises Invalid_argument as it is made.

module Summary : sig ... end

What the pages are of, "Showing 1-10 of 120": a <div> whose direction follows its own text.

module Content : sig ... end

The list of items: a <ul>.

module Item : sig ... end

One item: an <li> holding a link, Previous, Next or an ellipsis.

A page: Kobalte's button, aria-current="page" while is_active. on_press is called as it is pressed, by a pointer, Enter or Space.

module Previous : sig ... end

The button to the page before: Kobalte's button, its children an icon and a label.

module Next : sig ... end

The button to the page after, as Previous.

module Previous_icon : sig ... end

HeroUI's chevron to the left, or the icon it is given, in a <span> hidden from a reader.

module Next_icon : sig ... end

HeroUI's chevron to the right, or the icon it is given, as Previous_icon.

module Ellipsis : sig ... end

Pages left out: "…", hidden from a reader.

module Props : sig ... end