Skip to content

Instantly share code, notes, and snippets.

@0kzh
Created August 7, 2021 19:29
Show Gist options
  • Save 0kzh/0075044b53feb288cba037289775df21 to your computer and use it in GitHub Desktop.
Save 0kzh/0075044b53feb288cba037289775df21 to your computer and use it in GitHub Desktop.
Code to render a Lottie animation using React
import animationData from "./loading.json";
import { Player } from "@lottiefiles/react-lottie-player";
const App = () => {
return (
<div className="App">
<Player
autoplay
loop
src={animationData}
style={{ height: "50%", width: "50%" }}
/>
</div>
);
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment