BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/indiacn/pagination

Pagination

indiacn/pagination
FreeComponent

Page navigation with default and flat variants in 3 sizes.

Install it

npx shadcn@latest add https://indiacn.in/r/pagination.json

Source

components/ui/pagination.tsxindiacn.in/r/pagination.json · first 6 KB
1'use client';
2
3import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
4import { ComponentProps, createContext, useContext } from 'react';
5
6import { Label2 } from '@/components/ui/typography';
7import { cn } from '@/lib/utils';
8
9type TPaginationSize = 'sm' | 'md' | 'lg';
10type TPaginationVariant = 'default' | 'flat';
11
12const PAGINATION_CONTEXT = createContext<{ size: TPaginationSize; variant: TPaginationVariant }>({
13 size: 'md',
14 variant: 'default',
15});
16
17/** Navigation pagination component. */
18function Pagination({
19 className,
20 size = 'md',
21 variant = 'default',
22 ...props
23}: ComponentProps<'nav'> & { size?: TPaginationSize; variant?: TPaginationVariant }) {
24 return (
25 <PAGINATION_CONTEXT.Provider value={{ size, variant }}>
26 <nav
27 role='navigation'
28 aria-label='pagination'
29 className={cn('mx-auto flex w-full justify-center', className)}
30 {...props}
31 />
32 </PAGINATION_CONTEXT.Provider>
33 );
34}
35
36/** Container list for pagination items. */
37function PaginationContent({ className, ...props }: ComponentProps<'ul'>) {
38 const { variant } = useContext(PAGINATION_CONTEXT);
39
40 return (
41 <ul
42 className={cn(
43 'flex list-none flex-row items-center pl-0',
44 variant === 'flat'
45 ? 'gap-1.5'
46 : // The `first:`/`last:` Tailwind selectors compile to :first-child/:last-child.
47 // Each <a> is the only child of its <li>, so applying them on the link
48 // matches every link. Apply them at the <ul> level via descendant
49 // selectors so only the actual edge items get rounded corners.
50 'gap-0 [&>li:first-child>*]:rounded-l-md [&>li:last-child>*]:rounded-r-md',
51 className,
52 )}
53 {...props}
54 />
55 );
56}
57
58/** Single pagination list item wrapper. */
59function PaginationItem({ className, ...props }: ComponentProps<'li'>) {
60 return <li className={cn('list-none', className)} {...props} />;
61}
62
63interface IPaginationLinkProps extends ComponentProps<'a'> {
64 isActive?: boolean;
65 disabled?: boolean;
66 size?: TPaginationSize;
67 variant?: TPaginationVariant;
68}
69
70const PAGINATION_SIZE_CLASSES: Record<TPaginationVariant, Record<TPaginationSize, string>> = {
71 default: {
72 sm: 'px-2 py-1 text-sm',
73 md: 'px-3 py-1.5 text-base',
74 lg: 'px-6 py-3 text-lg',
75 },
76 flat: {
77 sm: 'size-7 text-sm',
78 md: 'size-8 text-base',
79 lg: 'size-10 text-lg',
80 },
81};
82
83/** UX4G-style page link with default and flat variants. */
84// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • https://indiacn.in/r/theme.json
  • https://indiacn.in/r/typography.json

Files it writes

  • components/ui/pagination.tsx

Facts

Registry
indiacn
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

indiacn.in krishnaagarwal1506/Indiacn-ui on GitHub Raw registry item This item as JSON

More from indiacn

All 26 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionindiacnComponentsFree2 deps
AlertalertindiacnComponentsFree2 deps
BadgebadgeindiacnComponentsFree1 dep
BreadcrumbbreadcrumbindiacnComponentsFree1 dep
ButtonbuttonindiacnComponentsFree3 deps
Button Groupbutton-groupindiacnComponentsFreeno deps
CardcardindiacnComponentsFree1 dep
ChipchipindiacnComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex