Rendyn

Component library

189 components

Product blocks

Image Zoom

Image Zoom adds an enlarged presentation around an image element.

Interactive exampleReact Tailwind CSS

Practical React example

Provide a larger view of an informative image without losing its description.

Before you copy and paste

Use the composed primitives together under their required provider, where one is present. Copy components/kibo-ui/image-zoom/index.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: react-medium-image-zoom.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Provide a larger view of an informative image without losing its description

// Usage adapted from Kibo UI's pinned MIT source.
// Copyright (c) 2023 — Present shadcnblocks. See ./LICENSES.md.
"use client";

import { ImageZoom } from "@/components/kibo-ui/image-zoom";
import Image from "next/image";

const Example = () => (
  <ImageZoom>
    <Image
      alt="Placeholder image"
      className="h-auto w-96"
      height={800}
      src="https://placehold.co/1200x800"
      unoptimized
      width={1200}
    />
  </ImageZoom>
);

export default Example;

Usage example adapted from Kibo UI's pinned MIT source. Retain the source licence notices when copying.

Supply meaningful alt text and a sufficiently detailed source image. Keep the original layout usable before the larger media is available.

Customization

ImageZoomProps.isZoomed
Optional; ControlledProps["isZoomed"].
ImageZoomProps.onZoomChange
Optional; ControlledProps["onZoomChange"].
ImageZoomProps.className
Optional; string.
ImageZoomProps.backdropClassName
Optional; string.

Integration notes

  • Test focus return, Escape and scroll behavior around the zoomed view.
  • Do not use zoom as the only way to read essential text embedded in an image.

Component source: Kibo UI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP