Pagination
cinatra-ai/paginationFreeComponent
Cinatra design-system Pagination controls.
Live preview
live · rendered by the registry
Rendered by @cinatra-ai on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/cinatra-ai/cinatra/main/public/r/pagination.jsonSource
1import * as React from "react"23import { cn } from "@/lib/utils"4import { Button } from "@/components/ui/button"5import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"67function Pagination({ className, ...props }: React.ComponentProps<"nav">) {8 return (9 <nav10 role="navigation"11 aria-label="pagination"12 data-slot="pagination"13 className={cn("mx-auto flex w-full justify-center", className)}14 {...props}15 />16 )17}1819function PaginationContent({20 className,21 ...props22}: React.ComponentProps<"ul">) {23 return (24 <ul25 data-slot="pagination-content"26 className={cn("flex items-center gap-0.5", className)}27 {...props}28 />29 )30}3132function PaginationItem({ ...props }: React.ComponentProps<"li">) {33 return <li data-slot="pagination-item" {...props} />34}3536type PaginationLinkProps = {37 isActive?: boolean38} & Pick<React.ComponentProps<typeof Button>, "size"> &39 React.ComponentProps<"a">4041// Pagination uses mono 13px text, an ink-filled active page, and prev/next chevrons.42// Active page is ink-filled (foreground bg + background text); surrounding43// pages are line-bordered on the touchable surface.44function PaginationLink({45 className,46 isActive,47 size = "icon",48 ...props49}: PaginationLinkProps) {50 return (51 <Button52 asChild53 variant={isActive ? "default" : "outline"}54 size={size}55 className={cn(56 "font-mono text-[13px]",57 isActive && "bg-foreground text-background hover:bg-foreground/90",58 className,59 )}60 >61 <a62 aria-current={isActive ? "page" : undefined}63 data-slot="pagination-link"64 data-active={isActive}65 {...props}66 />67 </Button>68 )69}7071function PaginationPrevious({72 className,73 text = "Previous",74 ...props75}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {76 return (77 <PaginationLink78 aria-label="Go to previous page"79 size="default"80 className={cn("pl-1.5!", className)}81 {...props}82 >83 <ChevronLeftIcon data-icon="inline-start" />84 <span className="hidden sm:block">{text}</span>85 </PaginationLink>86 )87}8889function PaginationNext({90 className,91 text = "Next",92 ...props93}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {94 return (95 <PaginationLink96 aria-label="Go to next page"97 size="default"98 className={cn("pr-1.5!", className)}99 {...props}100 >101// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from @cinatra-ai
All 14 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alertalert | @cinatra-ai | Components | Free | 1 dep | |
| Badgebadge | @cinatra-ai | Components | Free | 2 deps | |
| Buttonbutton | @cinatra-ai | Components | Free | 2 deps | |
| Cardcard | @cinatra-ai | Components | Free | no deps | |
| Fieldfield | @cinatra-ai | Components | Free | 1 dep | |
| Inputinput | @cinatra-ai | Components | Free | no deps | |
| Input Groupinput-group | @cinatra-ai | Components | Free | 1 dep | |
| Labellabel | @cinatra-ai | Components | Free | 1 dep |
