pagination
shipbase-ui/paginationFreeComponent
shipbase/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/pagination.jsonSource
1"use client"23import { type HTMLArkProps, ark } from "@ark-ui/react/factory"4import {5 Pagination as PaginationPrimitive,6 paginationAnatomy,7} from "@ark-ui/react/pagination"8import type { VariantProps } from "class-variance-authority"9import { MoreHorizontal } from "lucide-react"10import * as React from "react"1112import { buttonVariants } from "@/components/ui/button"13import { cn } from "@/lib/utils"1415const parts = paginationAnatomy.extendWith("content").build()1617const Pagination = React.forwardRef<18 React.ElementRef<typeof PaginationPrimitive.Root>,19 Omit<PaginationPrimitive.RootProps, "type">20>(({ className, ...props }, ref) => (21 <PaginationPrimitive.Root22 ref={ref}23 className={cn(24 "mx-auto flex w-full flex-row items-center justify-center gap-1",25 className26 )}27 {...props}28 />29))30Pagination.displayName = "Pagination"3132const PaginationContent = React.forwardRef<33 HTMLUListElement,34 HTMLArkProps<"ul">35>(({ className, ...props }, ref) => (36 <ark.ul37 ref={ref}38 {...parts.content.attrs}39 className={cn("flex flex-row items-center gap-1", className)}40 {...props}41 />42))43PaginationContent.displayName = "PaginationContent"4445const PaginationContext = PaginationPrimitive.Context4647const PaginationEllipsis = React.forwardRef<48 React.ElementRef<typeof PaginationPrimitive.Ellipsis>,49 PaginationPrimitive.EllipsisProps50>(({ className, ...props }, ref) => (51 <ark.li>52 <PaginationPrimitive.Ellipsis53 ref={ref}54 aria-hidden55 className={cn("flex h-9 w-9 items-center justify-center", className)}56 {...props}57 >58 <MoreHorizontal className="h-4 w-4" />59 <span className="sr-only">More pages</span>60 </PaginationPrimitive.Ellipsis>61 </ark.li>62))63PaginationEllipsis.displayName = "PaginationEllipsis"6465export interface PaginationItemProps66 extends PaginationPrimitive.ItemProps,67 VariantProps<typeof buttonVariants> {}6869const PaginationItem = React.forwardRef<70 React.ElementRef<typeof PaginationPrimitive.Item>,71 PaginationItemProps72>(({ className, variant = "outline", size, ...props }, ref) => (73 <ark.li>74 <PaginationPrimitive.Item75 ref={ref}76 className={cn(buttonVariants({ variant, size }), className)}77 {...props}78 />79 </ark.li>80))81PaginationItem.displayName = "PaginationItem"8283export interface PaginationNextTriggerProps84 extends PaginationPrimitive.NextTriggerProps,85 VariantProps<typeof buttonVariants> {}8687const PaginationNextTrigger = React.forwardRef<88// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from shipbase/ui
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shipbase/ui | Components | Free | 2 deps | |
| avataravatar | shipbase/ui | Components | Free | 1 dep | |
| badgebadge | shipbase/ui | Components | Free | 2 deps | |
| buttonbutton | shipbase/ui | Components | Free | 2 deps | |
| cardcard | shipbase/ui | Components | Free | 1 dep | |
| checkboxcheckbox | shipbase/ui | Components | Free | 2 deps | |
| collapsiblecollapsible | shipbase/ui | Components | Free | 1 dep | |
| comboboxcombobox | shipbase/ui | Components | Free | 2 deps |
