A shadcn-style zoom image component built with Ark UI primitives.

Installation

npx shadcn@latest add @ark-cn/zoom-image

Usage

import * as ZoomImage from "@/components/ui/zoom-image"

Read exported parts in src/components/ui/zoom-image.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Preview

Button zoom

1.00×

API reference

This component mirrors the upstream Ark UI primitive. All props and DOM behavior are defined by Ark unless you see an ark-cn-only row below.

ZoomImage

PropTypeDescription
altstringRequired image alt text.
srcstringRequired image URL.
viewportClassName?stringClass on the viewport wrapper.

See the ARK UI documentation for the full API.