InlineCrop
The Inline Crop component displays an overlay and interaction handlers for inline cropping of an image on a design area.
The overlay stretches to fill the dimensions of its parent element, and cropping is done via the resize handles and by dragging the image.
name | type | required | comment |
---|---|---|---|
crop | Crop | yes | The cropping box's offset as a percent from the top, right, bottom, and left edges of the image |
onMoveCrop | (value: { crop: Crop }) => void | yes | |
onResizeCrop | (value: CroppingValues) => void | yes | |
position | { x: number; y: number } | yes | The item's position within the design area |
rotation | number | yes | The item's rotation |
size | { height: number; width: number } | yes | The item's size |
uncroppedUrl | string | yes | URL pointing to the uncropped version of the image |
ariaLabel | string | no | |
className | string | no | |
role | AriaRole | no | |
style | CSSProperties | no |
Result
Loading...
Live Editor