Warcraft Pagination
warcraftcn/paginationFreeComponent
A Warcraft-themed pagination component with fantasy button styling and runes.
Live preview
live · rendered by the registry
Rendered by warcraftcn on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.warcraftcn.com/r/pagination.jsonSource
1import * as React from "react";2import { ChevronLeft, ChevronRight } from "lucide-react";34import { cn } from "@/lib/utils";5import { buttonVariants } from "@/components/ui/warcraftcn/button";67import "@/components/ui/warcraftcn/styles/warcraft.css";89const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (10 <nav11 aria-label="pagination"12 className={cn("mx-auto flex w-full justify-center", className)}13 {...props}14 />15);16Pagination.displayName = "Pagination";1718const PaginationContent = React.forwardRef<19 HTMLUListElement,20 React.ComponentProps<"ul">21>(({ className, ...props }, ref) => (22 <ul23 ref={ref}24 className={cn("flex flex-row items-center gap-1 list-none", className)}25 {...props}26 />27));28PaginationContent.displayName = "PaginationContent";2930const PaginationItem = React.forwardRef<31 HTMLLIElement,32 React.ComponentProps<"li">33>(({ className, ...props }, ref) => (34 <li ref={ref} className={cn("", className)} {...props} />35));36PaginationItem.displayName = "PaginationItem";3738type PaginationLinkProps = {39 isActive?: boolean;40 disabled?: boolean;41} & React.ComponentProps<"a">;4243const PaginationLink = ({44 className,45 isActive,46 disabled,47 ...props48}: PaginationLinkProps) => (49 <a50 aria-current={isActive ? "page" : undefined}51 aria-disabled={disabled ? "true" : undefined}52 tabIndex={disabled ? -1 : undefined}53 className={cn(54 buttonVariants({55 variant: "frame",56 }),57 "border-solid [border-image-repeat:stretch] border-5 [border-image-slice:16_fill] wc-btn-border-frame transition-all duration-200",58 "w-10 h-10 px-0 sm:w-12 sm:h-12 flex items-center justify-center font-bold no-underline",59 isActive60 ? "text-amber-200 [text-shadow:0_0_8px_rgba(251,191,36,0.6)] shadow-[inset_0_0_10px_rgba(0,0,0,0.8)] brightness-110"61 : "text-amber-100/70 hover:text-amber-100 hover:brightness-110",62 disabled && "opacity-50 pointer-events-none cursor-not-allowed",63 className64 )}65 {...props}66 />67);68PaginationLink.displayName = "PaginationLink";6970const PaginationPrevious = ({71 className,72 ...props73}: React.ComponentProps<typeof PaginationLink>) => (74 <PaginationLink75 aria-label="Go to previous page"76 className={cn("gap-1 sm:w-auto sm:px-4 sm:pr-5", className)}77 {...props}78 >79 <ChevronLeft className="h-4 w-4 text-amber-500 filter-[drop-shadow(0_0_2px_rgba(245,158,11,0.5))]" />80 <span className="hidden sm:block">Previous</span>81// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from warcraftcn
All 16 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Warcraft Accordionaccordion | warcraftcn | Components | Free | 1 dep · 7 files | |
| Warcraft Avataravatar | warcraftcn | Components | Free | no deps · 7 files | |
| Warcraft Badgebadge | warcraftcn | Components | Free | no deps · 4 files | |
| Warcraft Buttonbutton | warcraftcn | Components | Free | no deps · 6 files | |
| Warcraft Cardcard | warcraftcn | Components | Free | no deps · 3 files | |
| Warcraft Checkboxcheckbox | warcraftcn | Components | Free | 1 dep · 12 files | |
| Warcraft Cursorcursor | warcraftcn | Components | Free | no deps · 6 files | |
| Warcraft Dropdown Menudropdown-menu | warcraftcn | Components | Free | 2 deps · 3 files |
