BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/solid-ui/pagination

Pagination

solid-ui/pagination
FreeComponent

A pagination component

Live preview

live · rendered by the registry
Rendered by solid-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.solid-ui.com/r/pagination.json

Source

src/registry/ui/pagination.tsxwww.solid-ui.com/r/pagination.json
1import type { JSX, ValidComponent } from "solid-js"
2import { Show, splitProps } from "solid-js"
3
4import * as PaginationPrimitive from "@kobalte/core/pagination"
5import type { PolymorphicProps } from "@kobalte/core/polymorphic"
6
7import { cn } from "~/lib/utils"
8import { buttonVariants } from "~/registry/ui/button"
9
10const PaginationItems = PaginationPrimitive.Items
11
12type PaginationRootProps<T extends ValidComponent = "nav"> =
13 PaginationPrimitive.PaginationRootProps<T> & { class?: string | undefined }
14
15const Pagination = <T extends ValidComponent = "nav">(
16 props: PolymorphicProps<T, PaginationRootProps<T>>
17) => {
18 const [local, others] = splitProps(props as PaginationRootProps, ["class"])
19 return (
20 <PaginationPrimitive.Root
21 class={cn("[&>*]:flex [&>*]:flex-row [&>*]:items-center [&>*]:gap-1", local.class)}
22 {...others}
23 />
24 )
25}
26
27type PaginationItemProps<T extends ValidComponent = "button"> =
28 PaginationPrimitive.PaginationItemProps<T> & { class?: string | undefined }
29
30const PaginationItem = <T extends ValidComponent = "button">(
31 props: PolymorphicProps<T, PaginationItemProps<T>>
32) => {
33 const [local, others] = splitProps(props as PaginationItemProps, ["class"])
34 return (
35 <PaginationPrimitive.Item
36 class={cn(
37 buttonVariants({
38 variant: "ghost"
39 }),
40 "size-10 data-[current]:border",
41 local.class
42 )}
43 {...others}
44 />
45 )
46}
47
48type PaginationEllipsisProps<T extends ValidComponent = "div"> =
49 PaginationPrimitive.PaginationEllipsisProps<T> & {
50 class?: string | undefined
51 }
52
53const PaginationEllipsis = <T extends ValidComponent = "div">(
54 props: PolymorphicProps<T, PaginationEllipsisProps<T>>
55) => {
56 const [local, others] = splitProps(props as PaginationEllipsisProps, ["class"])
57 return (
58 <PaginationPrimitive.Ellipsis
59 class={cn("flex size-10 items-center justify-center", local.class)}
60 {...others}
61 >
62 <svg
63 xmlns="http://www.w3.org/2000/svg"
64 viewBox="0 0 24 24"
65 fill="none"
66 stroke="currentColor"
67 stroke-width="2"
68 stroke-linecap="round"
69 stroke-linejoin="round"
70 class="size-4"
71 >
72 <circle cx="12" cy="12" r="1" />
73 <circle cx="19" cy="12" r="1" />
74 <circle cx="5" cy="12" r="1" />
75 </svg>
76 <span class="sr-only">More pages</span>
77 </PaginationPrimitive.Ellipsis>
78 )
79}
80
81type PaginationPreviousProps<T extends ValidComponent = "button"> =
82// … truncated

What it pulls in

npm packages

  • solid-js
  • @kobalte/core

Other registry items

  • https://solid-ui.com/r/button.json

Files it writes

  • src/registry/ui/pagination.tsx

Facts

Registry
solid-ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on solid-ui www.solid-ui.com stefan-karger/solid-ui on GitHub Raw registry item This item as JSON

More from solid-ui

All 55 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionsolid-uiComponentsFree2 deps
Alertalertsolid-uiComponentsFree3 deps
Alert Dialogalert-dialogsolid-uiComponentsFree2 deps
Aspect Ratioaspect-ratiosolid-uiComponentsFree1 dep
Avataravatarsolid-uiComponentsFree2 deps
Badgebadgesolid-uiComponentsFree2 deps
Badge Deltabadge-deltasolid-uiComponentsFree2 deps
Bar Listbar-listsolid-uiComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex