Lottie
A component for displaying Lottie animations from JSON files.
组件展示
属性
属性名
类型
必需性
描述
id*ComponentId必需
暂无描述
accessibilityAccessibilityAttributes可选
暂无描述
stylesStyles可选
Component style properties
weightnumber可选
The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column.
component*"Lottie"必需
暂无描述
url*string | DataBinding | object必需
Represents a string
autoPlayboolean可选
Whether to automatically play the animation. Defaults to true.
默认值:
trueloopboolean可选
Whether to loop the animation. Defaults to true.
默认值:
truevariant"icon" | "small" | "medium" | "large"可选
A hint for the animation size.
可选值:
icon, small, medium, large代码示例
{
"component": "Lottie",
"id": "lottie_1",
"url": "示例url"
}