{"repo":"ValentinH/svelte-easy-crop","free":true,"listed":false,"github":"https://github.com/ValentinH/svelte-easy-crop","clone":"git clone https://github.com/ValentinH/svelte-easy-crop.git","description":"A Svelte component to crop images with easy interactions","language":"TypeScript","stars":254,"topics":["svelte","crop","crop-image","image-manipulation","cropping"],"license":"MIT","category":"ui-components","readme_excerpt":"svelte-easy-crop A Svelte component to crop images with easy interactions This is a rewrite of react-easy-crop (https://github.com/valentinh/react-easy-crop). ℹ️ The minimum supported Svelte version is v5. If you are still on an older version, you need to use the 3.x.x versions of svelte-easy-crop [![version][version-badge]][package] [![Monthly downloads][npmstats-badge]][npmstats] ![gzip size][gzip-badge] [![MIT License][license-badge]][license] [![PRs Welcome][prs-badge]][prs] Demo - Basic example Features - Supports drag and zoom interactions - Provides crop dimensions as pixels and percentages - Supports any images format (JPEG, PNG, even GIF) as url or base 64 string - Mobile friendly Installation or Basic usage The Cropper is styled with position: absolute to take the full space of its parent. Thus, you need to wrap it with an element that uses position: relative or the Cropper will fill the whole page. Props Prop Type Required Description :----------------- :---------------------------------- :------: :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- image string ✓ The image to be cropped. crop { x: number, y: number } ✓ Position of the image. { x: 0, y: 0 } will center the image under the cropper. zoom number Zoom of the i","default_branch":null,"files":null,"tree":[],"storefront":"/r/ValentinH","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ValentinH/svelte-easy-crop/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}