Image Zoom Demo

PreviousNext

Demo showing a image zoom effect.

Docs
animate-uiui

Preview

Loading preview…
registry/demo/primitives/effects/image-zoom/index.tsx
import { ImageZoom, Image } from '@/components/animate-ui/primitives/effects/image-zoom';
import NextImage from 'next/image';

export const ImageZoomDemo = () => {
  return (
    <ImageZoom className="rounded-2xl">
      <Image
        src="https://images.pexels.com/photos/34293571/pexels-photo-34293571.jpeg"
        alt="Aerial View of the Great Lake of Almaty in Kazakhstan"
        as={NextImage}
        width={3840}
        height={2160}
      />
    </ImageZoom>
  );
};

Installation

npx shadcn@latest add @animate-ui/demo-primitives-effects-image-zoom

Usage

import { DemoPrimitivesEffectsImageZoom } from "@/components/ui/demo-primitives-effects-image-zoom"
<DemoPrimitivesEffectsImageZoom />