BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/inferencesh/zoomable-image

Zoomable Image

inferencesh/zoomable-image
FreeBlock

Click-to-zoom image component with medium.com-style lightbox.

Install it

npx shadcn@latest add https://ui.inference.sh/r/zoomable-image.json

Source

components/infsh/zoomable-image.tsxui.inference.sh/r/zoomable-image.json
1"use client"
2
3import Zoom from "react-medium-image-zoom"
4import "react-medium-image-zoom/dist/styles.css"
5import "./zoomable-image.css"
6import { ImageOff } from "lucide-react"
7import { DetailedHTMLProps, ImgHTMLAttributes, useState } from "react"
8
9export interface ZoomableImageProps
10 extends DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
11 /** Disable zoom behavior */
12 disabled?: boolean
13 /** Higher quality image src to load when zoomed */
14 zoomSrc?: string
15 /** Offset in pixels from window boundaries when zoomed */
16 zoomMargin?: number
17}
18
19export default function ZoomableImage({
20 src,
21 alt,
22 className,
23 onLoad,
24 onError,
25 disabled = false,
26 zoomSrc,
27 zoomMargin = 16,
28 ...rest
29}: ZoomableImageProps) {
30 const [hasError, setHasError] = useState(false)
31
32 if (!src) return null
33
34 const handleError = (e: React.SyntheticEvent<HTMLImageElement, Event>) => {
35 setHasError(true)
36 onError?.(e)
37 }
38
39 if (hasError) {
40 return (
41 <div className="aspect-square w-full h-24 flex items-center justify-center rounded-md">
42 <div className="flex flex-col items-center gap-2 text-muted-foreground">
43 <ImageOff strokeWidth={1} className="w-8 h-8" />
44 </div>
45 </div>
46 )
47 }
48
49 const image = (
50 <img
51 src={src}
52 alt={alt || ""}
53 className={className}
54 onLoad={onLoad}
55 onError={handleError}
56 {...rest}
57 />
58 )
59
60 if (disabled) {
61 return image
62 }
63
64 return (
65 <Zoom
66 classDialog="zoomable-image-dialog"
67 zoomMargin={zoomMargin}
68 zoomImg={zoomSrc ? { src: zoomSrc } : undefined}
69 >
70 {image}
71 </Zoom>
72 )
73}

What it pulls in

npm packages

  • react-medium-image-zoom

Facts

Registry
inferencesh
Type
registry:block
Access
Free
Files written
0
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

ui.inference.sh Raw registry item This item as JSON

More from inferencesh

All 14 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Agent ChatagentinferenceshBlocksFree1 dep
Chat UI PrimitiveschatinferenceshBlocksFree1 dep
Code Blockcode-blockinferenceshBlocksFreeno deps
Markdown Renderer (legacy)markdowninferenceshBlocksFree2 deps
pretext-mdpretext-mdinferenceshBlocksFree4 deps
Sidebar Lightsidebar-lightinferenceshBlocksFreeno deps
StepsstepsinferenceshBlocksFreeno deps
Table of Contentstable-of-contentsinferenceshBlocksFreeno 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