svelte-imgcrop Svelte Themes

Svelte Imgcrop

A svelte component for image crop.

svelte-imgcrop

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

Demo 示例

click me

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)

Top categories

Loading Svelte Themes