Pagination

Pagination with page navigation, next, and previous links.

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::pagination::*;

#[component]
pub fn PaginationAnatomy() -> impl IntoView {
    view! {
        <Pagination>
            <PaginationContent>
                <PaginationItem>
                    <PaginationPrevious />
                    <PaginationLink />
                    <PaginationEllipsis />
                    <PaginationNext />
                </PaginationItem>
            </PaginationContent>
        </Pagination>
    }
}

API Reference

Pagination

Contains all the parts of the pagination component.

Implements global attributes.

PaginationContent

Contains pagination content.

Implements global attributes.

PaginationEllipsis

Contains a pagination ellipsis.

Implements global attributes.

PaginationItem

Contains a pagination item.

Implements global and li attributes.

PaginationLink

A pagination link.

Custom Attributes
NameTypeDefaultDescription
activeboolfalse

Toggle whether or not this button should render with active styling.

Implements global and a attributes.

PaginationNext

A pagination next button.

Implements global and a attributes.

PaginationPrevious

A pagination previous button.

Implements global and a attributes.