Carregando…
Carregando…
Carregando…Interactive image crop tool with drag/resize crop area and aspect ratio constraint.
Image Cropper — drag handles to define crop area
$ npx kikitocn add image-cropper@/lib/utilsimport { ImageCropper } from "@/components/ui/cn/image-cropper/ImageCropper";
export function ImageCropperExample() {
return (
<ImageCropper />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
src* | string | — | URL da imagem a ser recortada |
aspect | number | undefined | Proporção width/height obrigatória (ex: 16/9, 1) |
onCrop | (area: CropArea) => void | undefined | Callback com área recortada: { x, y, width, height } |