lotusui
A Go design system for desktop and mobile — one codebase, native apps. Web when you want it.
GitHub

Pagination

Previous, next, numbered pages — long ranges elide around the current one.

Page is 1-based and lives on the struct; clicks are processed at the top of Layout, so the click's own frame renders the new page.

Installation

Use the module import (the default), or own the source: lotusui add vendors the component into your app and lotusui update keeps the copy mergeable — see Registry.

Go
go get github.com/ikaito-com/lotusui

# or vendor the source into your app:
go run github.com/ikaito-com/lotusui/cmd/lotusui add pagination

Usage

open demo ↗

Simple

Simple renders numbered links only — no previous/next, no elision.

open demo ↗

Rows per page

The table toolbar: a Select for page size beside the pager — composition.

open demo ↗

API

OptionTypeDescription
Pageint1-based current page — yours; clicks processed at the top of Layout.
totalintLayout parameter — total page count; long ranges elide.

lotusui is a Go design system for native desktop and mobile — and the web when you want it. Docs demos are the real components (WebAssembly) — one gallery app, each Preview an iframe addressed by URL hash.