Free
Pro

Image Cropper

A mobile-ready image cropper component built for high performance and usability, allowing users to upload, zoom, rotate, and crop images.

Pro

Image Cropper — part of Base UI Pro

Unlock it plus 89 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.

Unlock Pro

Live Demo

Select an image to see the cropper in action.

Upload an image

Select an image to see the cropper in action.

No file chosen
Upload image

HTML

Installation

Run the following command to add this component to your project:

bash

npx base-ui-cli add crop-image

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.

bash

npx -y base-ui-mcp

Base UI provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx base-ui-cli add crop-image
// Paths are relative to aliases.components (default: src/app/components)
import { CropImageComponent } from './crop-image/crop-image.component';

@Component({
  selector: 'app-your-component',
  imports: [
    CropImageComponent
  ],
  template: `...`
})
export class YourComponent {}

API for crop-image — generated from JSDoc in the library source.

API reference for crop-image
APIMemberTypeDefaultDescription
base-crop-imageimageFileFile | undefinedundefinedFile object from base-file-upload or programmatic use
base-crop-imageimageChangedEventEvent | nullnullNative file input change event (alternative to imageFile)
base-crop-imagemaintainAspectRatiobooleantrueThe maintainAspectRatio input property.
base-crop-imageaspectRationumber1The aspectRatio input property.
base-crop-imagehideIfEmptybooleantrueThe hideIfEmpty input property.
base-crop-imagecropperHeightunknown'400px'Height of the crop viewport (CSS value). Width auto-calculates from aspect ratio.
base-crop-image(cropped)Blob | nullThe cropped output property.
base-crop-image(canceled)voidThe canceled output property.