svelte-imgcrop

2.0.3 • Public • Published

svelte-imgcrop

npm version npm downloads MIT

A svelte component for image crop. (Svelte 图片裁剪组件)

Demo 示例

click me

Brower compatibility

IE10+

Env 环境

svelte@3 + rollup@2

Install 安装

npm install svelte-imgcrop

Usage 使用

<script lang="ts">
  import ImgCrop from "svelte-imgcrop";
 
  let img = "/images/demo.png";
</script> 
 
<ImgCrop src={img} />

Options 配置项

Prop

Prop Type Default Desc
src string '' The image to be cropped
width Number 400 Container width
height Number 300 Container height

Events

Name Desc
change Crop success,params(e)

Readme

Keywords

Package Sidebar

Install

npm i svelte-imgcrop

Weekly Downloads

11

Version

2.0.3

License

MIT

Unpacked Size

21.3 kB

Total Files

5

Last publish

Collaborators

  • bestvist