Pagination
poyraz/paginationFreeComponent
Poyraz Soft Glass pagination component with standardized floating and overlay behavior.
Install it
npx shadcn@latest add https://ui.poyrazavsever.com/r/pagination.jsonSource
1import * as React from "react";2import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";34import { cn } from "@/lib/utils";5import { ButtonProps, buttonVariants } from "@/components/ui/atoms/button";67const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (8 <nav9 role="navigation"10 aria-label="pagination"11 className={cn("mx-auto flex w-full justify-center", className)}12 {...props}13 />14);15Pagination.displayName = "Pagination";1617const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(18 ({ className, ...props }, ref) => (19 <ul20 ref={ref}21 className={cn(22 "flex max-w-full flex-row flex-nowrap items-center justify-start gap-1 overflow-x-auto scrollbar-none sm:justify-center",23 "transition-[color,background-color,border-color] duration-[var(--poyraz-motion-duration-fast)] ease-[var(--poyraz-motion-ease-out)]",24 className,25 )}26 {...props}27 />28 ),29);30PaginationContent.displayName = "PaginationContent";3132const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(33 ({ className, ...props }, ref) => <li ref={ref} className={cn("", className)} {...props} />,34);35PaginationItem.displayName = "PaginationItem";3637type PaginationLinkProps = {38 isActive?: boolean;39} & Pick<ButtonProps, "size"> &40 React.ComponentProps<"a">;4142const PaginationLink = ({ className, isActive, size = "icon", ...props }: PaginationLinkProps) => (43 <a44 aria-current={isActive ? "page" : undefined}45 className={cn(46 buttonVariants({47 variant: "ghost",48 size,49 radius: "md",50 }),51 "transition-[color,background-color,border-color] duration-[var(--poyraz-motion-duration-fast)] ease-[var(--poyraz-motion-ease-out)]",52 isActive &&53 "border border-primary/25 bg-primary-muted text-primary shadow-sm hover:border-primary/35 hover:bg-primary-muted hover:text-primary",54 className,55 )}56 {...props}57 />58);59PaginationLink.displayName = "PaginationLink";6061const PaginationPrevious = ({62 className,63 ...props64}: React.ComponentProps<typeof PaginationLink>) => (65 <PaginationLink66 aria-label="Go to previous page"67 size="default"68 className={cn("group gap-1 pl-2.5", className)}69 {...props}70 >71 <ChevronLeft className="h-4 w-4" />72 <span className="hidden sm:inline">Previous</span>73 </PaginationLink>74);75PaginationPrevious.displayName = "PaginationPrevious";7677// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from poyraz
All 71 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | poyraz | Components | Free | 2 deps | |
| Alertalert | poyraz | Components | Free | 2 deps | |
| Announcement Barannouncement-bar | poyraz | Components | Free | 2 deps | |
| Autocompleteautocomplete | poyraz | Components | Free | 1 dep | |
| Avataravatar | poyraz | Components | Free | 2 deps | |
| Badgebadge | poyraz | Components | Free | 1 dep | |
| Bg Patternbg-pattern | poyraz | Components | Free | no deps | |
| Breadcrumbbreadcrumb | poyraz | Components | Free | 1 dep |
