Skip to content

Commit

Permalink
Merge branch 'master' into feature/add-migration-guide-from-v5-to-v6
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRogue76 committed Jan 16, 2024
2 parents cd6991a + dff6ca1 commit 4618802
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Codegen animations are supported by adding LottieAnimation items to your project

```js
// js
<LottieView source={"MyAnimation"} />
<LottieView source={"MyAnimation"} style={{width: "100%", height: "100%"}} />
```

Codegen is available to both C# and C++ applications. Dynamic loading of JSON strings at runtime is currently only supported in C# applications.
Expand All @@ -122,7 +122,12 @@ import LottieView from "lottie-react-native";

export default function Animation() {
return (
<LottieView source={require("../path/to/animation.json")} autoPlay loop />
<LottieView
source={require("../path/to/animation.json")}
style={{width: "100%", height: "100%"}}
autoPlay
loop
/>
);
}
```
Expand All @@ -147,6 +152,7 @@ export default function AnimationWithImperativeApi() {
<LottieView
ref={animationRef}
source={require("../path/to/animation.json")}
style={{width: "100%", height: "100%"}}
/>
);
}
Expand Down Expand Up @@ -177,6 +183,7 @@ export default function ControllingAnimationProgress() {
<AnimatedLottieView
source={require("../path/to/animation.json")}
progress={animationProgress.current}
style={{width: "100%", height: "100%"}}
/>
);
}
Expand Down Expand Up @@ -204,6 +211,7 @@ export default function ChangingColorOfLayers() {
color: "#F00000",
},
]}
style={{width: "100%", height: "100%"}}
autoPlay
loop
/>
Expand Down

0 comments on commit 4618802

Please sign in to comment.