ReviewOS

stacks/stx

Built-in Breadcrumb and Pagination components

#1685
Closed glennmichael123 opened this 23 days ago · 1 comment
23 days ago

Summary

Navigation components — route-aware breadcrumbs and data pagination.

Components

<StxBreadcrumb>

<!-- Auto-generate from current route -->
<StxBreadcrumb auto />

<!-- Manual items -->
<StxBreadcrumb>
  <StxBreadcrumbItem to="/">Home</StxBreadcrumbItem>
  <StxBreadcrumbItem to="/settings">Settings</StxBreadcrumbItem>
  <StxBreadcrumbItem>Security</StxBreadcrumbItem>
</StxBreadcrumb>

Props: auto (generate from route path), separator (default: /), maxItems (collapse middle items)

<StxPagination>

<StxPagination :total="items().length" :perPage="10" x-model="currentPage" />
<StxPagination :total="500" :perPage="20" x-model="page" showEdges sibling="2" />

Props: total, perPage, x-model (current page signal), showEdges (first/last buttons), sibling (pages around current), size, variant

Features

  • Breadcrumb: integrates with useRoute(), SPA-aware links via StxLink
  • Pagination: signal-reactive, keyboard accessible, responsive (collapses on mobile)
23 days ago

Delivered via @stacksjs/components, which ships with every stx app and is auto-registered (no import needed in .stx files). See CLAUDE.md § "Reach for stx primitives before vanilla JS" for the full inventory; the relevant components for this request are documented there.

Closing as effectively delivered. If a specific behavior or API affordance from the original request is missing from the shipped components, please open a focused ticket against @stacksjs/components describing the exact gap — that's easier to track than a broad "make it a builtin" ask.

Sign in to comment on this issue.