Add examples for using rive-react

This commit is contained in:
Arthur Vivian
2021-06-04 19:42:06 +01:00
parent 3b1d7593fe
commit 6b27b95541
31 changed files with 553 additions and 0 deletions

12
examples/basic/src/App.js Normal file
View File

@@ -0,0 +1,12 @@
import Rive from "rive-react";
function App() {
return (
// The animation will fit to the parent element.
<div style={{ height: "500px", width: "500px" }}>
<Rive src="poison-loader.riv" autoplay />
</div>
);
}
export default App;

View File

@@ -0,0 +1,10 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
);