All components

Image Cropper

Crop selection over an image with drag-to-move, eight resize handles, an optional locked aspect ratio, arrow-key nudging, and a rule-of-thirds grid while dragging.

measuring…

Fixed aspect ratio

`aspectRatio={1}` locks the selection to a square; corner and edge handles keep the ratio and stay inside the image.

measuring…

Circle crop

`cropShape="circle"` rounds the selection for avatar crops; the crop rect is still the bounding box.

measuring…

Install

Source

components/ui/base-ui/image-cropper.tsx