BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-extras/enlarge-gallery

Enlarge Gallery

shadcn-extras/enlarge-gallery
FreeComponent

A cinematic, full-screen image gallery with expanding thumbnails.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/NayanDevLab/shadcn-extras/dev/public/c/enlarge-gallery.json

Source

enlarge-gallery.tsxraw.githubusercontent.com/NayanDevLab/shadcn-extras/dev/public/c/enlarge-gallery.json
1'use client';
2
3import React, { useState, useCallback } from 'react';
4import { ChevronLeft, ChevronRight } from 'lucide-react';
5import { cn } from '@/lib/utils';
6import './enlarge-gallery.css';
7
8export interface EnlargeGalleryItem {
9 id: string | number;
10 src: string;
11 alt?: string;
12 title: string;
13 description?: string;
14}
15
16export interface EnlargeGalleryProps extends React.HTMLAttributes<HTMLDivElement> {
17 items: EnlargeGalleryItem[];
18}
19
20export const EnlargeGallery = React.forwardRef<
21 HTMLDivElement,
22 EnlargeGalleryProps
23>(({ className, items, ...props }, ref) => {
24 const [activeIndex, setActiveIndex] = useState(0);
25
26 // The thumbnail strip as a queue of item ids, left to right; the active
27 // item is excluded. Every change removes the incoming item from the queue
28 // and pushes the outgoing item onto the end.
29 const [thumbOrder, setThumbOrder] = useState<(string | number)[]>(() =>
30 items.slice(1).map((item) => item.id)
31 );
32
33 const goToIndex = useCallback(
34 (newIndex: number) => {
35 setActiveIndex((oldIndex) => {
36 if (oldIndex === newIndex) return oldIndex;
37
38 setThumbOrder((order) => [
39 ...order.filter((id) => id !== items[newIndex].id),
40 items[oldIndex].id,
41 ]);
42
43 return newIndex;
44 });
45 },
46 [items]
47 );
48
49 if (!items || items.length === 0) return null;
50
51 const activeItem = items[activeIndex];
52 const total = items.length;
53
54 const indexOfId = (id: string | number) =>
55 items.findIndex((i) => i.id === id);
56
57 return (
58 <div
59 ref={ref}
60 className={cn('enlarge-gallery-root font-sans', className)}
61 {...props}
62 >
63 <div className='enlarge-gallery-gallery relative h-full w-full'>
64 {/* Slides / Track */}
65 <div className='enlarge-gallery-track absolute inset-0 h-full w-full'>
66 {items.map((item, index) => {
67 const active = index === activeIndex;
68 const offset = active
69 ? 0
70 : thumbOrder.indexOf(item.id) - (thumbOrder.length - 1) / 2;
71
72 return (
73 <div
74 key={item.id}
75 className='enlarge-gallery-item'
76 data-active={String(active)}
77 >
78 <div
79 className='enlarge-gallery-slide'
80 style={{ '--offset': offset } as React.CSSProperties}
81 >
82 {/* eslint-disable-next-line @next/next/no-img-element */}
83 <img
84// … truncated

What it pulls in

npm packages

  • lucide-react

Files it writes

  • \components\core\enlarge-gallery.tsx
  • \components\core\enlarge-gallery.tsx
  • \components\core\enlarge-gallery.css

Facts

Registry
shadcn-extras
Type
registry:ui
Access
Free
Files written
3
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
today

Go to the source

nayanrdeveloper.github.io NayanDevLab/shadcn-extras on GitHub Raw registry item This item as JSON

More from shadcn-extras

All 33 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Image Gridanimated-image-gridshadcn-extrasComponentsFreeno deps · 3 files
Blog Card Fourblog-card-fourshadcn-extrasComponentsFree1 dep
Blog Card Oneblog-card-oneshadcn-extrasComponentsFreeno deps
Blog Card Threeblog-card-threeshadcn-extrasComponentsFree1 dep
Blog Card Twoblog-card-twoshadcn-extrasComponentsFree1 dep
Bulb Iconbulb-iconshadcn-extrasComponentsFree2 deps
Chevron Stepschevron-stepsshadcn-extrasComponentsFreeno deps
Circular Gallerycircular-galleryshadcn-extrasComponentsFreeno deps · 3 files

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