Skip to content

LottieWrapper

使用lottie-web显示动画的组件

示例

jsx
<LottieWrapper className={styles.bg} path={"/lottie/背景边框_动效/data.json"} />

参数

LottieProps

key类型描述
pathstring | undefined动画地址
styleReact.CSSProperties | undefinedstyle
classNamestring | undefinedclass
clipClipOptions | undefined裁剪
onLoopComplete(() => void) | undefinedloopComplete 事件监听

ClipOptions

key类型
originalWidthProperty.Width<string | number> | undefined
originalHeightProperty.Height<string | number> | undefined
clipLeftProperty.Left<string | number> | undefined
clipTopProperty.Top<string | number> | undefined