百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

lottie-react

> 前端框架
开源

将 lottie web player 设置为 React 组件

798 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

将 lottie web player 设置为 React 组件

[!IMPORTANT] 此包(@lottiefiles/React-lottie-player)已过时,不再维护。 请使用 @lottiefiles/dotlottie-React 代替。

添加 Player 元素,并将 src 属性设置为指向有效 Lottie JSON 的 URL。

Prop 说明 类型 默认值
lottieRef 获取 lottie 动画对象 function undefined
onEvent 监听事件 function undefined
onStateChange 播放状态更改 function undefined
onBackgroundChange 监听背景更改 function undefined
autoplay 加载时自动播放动画。 boolean false
background 背景颜色。 string undefined
controls 显示控制

Issues· 49 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptreacttypescript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架