Skip to content

🎥 Make videos programmatically with React

rive docs

Jonny Burger01866be55009
diff --git a/packages/docs/docs/lottie/lottie-comp.md b/packages/docs/docs/lottie/lottie-comp.md
index 1b8084102f..1139f78110 100644
--- a/packages/docs/docs/lottie/lottie-comp.md
+++ b/packages/docs/docs/lottie/lottie-comp.md
@@ -98,3 +98,7 @@ const Comp: React.FC = () => {
);
};
```
+
+## See also
+
+- [`@remotion/rive`](/docs/rive)
diff --git a/packages/docs/docs/rive/index.md b/packages/docs/docs/rive/index.md
index 09ecf4fe13..c12d58672f 100644
--- a/packages/docs/docs/rive/index.md
+++ b/packages/docs/docs/rive/index.md
@@ -1,10 +1,12 @@
---
sidebar_label: Overview
title: "@remotion/rive"
+crumb: Integrations
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
+import {TableOfContents} from '../../components/TableOfContents/rive';
This package provides a component for rendering [Rive](https://rive.app) animations in Remotion
@@ -36,3 +38,11 @@ pnpm i @remotion/rive
```
</TabItem>
</Tabs>
+
+## API
+
+<TableOfContents />
+
+## License
+
+[Remotion License](https://remotion.dev/license)
diff --git a/packages/docs/docs/rive/remotionrivecanvas.md b/packages/docs/docs/rive/remotionrivecanvas.md
index fa680f7ba4..c7b92b91c9 100644
--- a/packages/docs/docs/rive/remotionrivecanvas.md
+++ b/packages/docs/docs/rive/remotionrivecanvas.md
@@ -1,15 +1,27 @@
---
-sidebar_label: Overview
-title: "<RemotionRiveCanvas>"
+crumb: "@remotion/rive"
+sidebar_label: "<RemotionRiveCanvas>"
---
+# &lt;RemotionRiveCanvas&gt; <AvailableFrom v="3.3.66"/>
+
This component can render a [Rive](https://rive.app/) animation so it synchronizes with Remotion's time.
## Props
-- `src`: a valid URL of the rive file to load. When it is left empty, the default animation is rendered.
+### `src`
+
+a valid URL of the rive file to load. Can be a local file loaded using [`staticFile()`](/docs/staticfile) or a remote URL like `"https://cdn.rive.app/animations/vehicles.riv"`.
+
+### `fit?`
+
+One of: `"contain" | "cover" | "fill" | "fit-height" | "none" | "scale-down" | "fit-width"`. Default is `"contain"`.
-## Usage
+### `alignment`
+
+One of: `"center" | "bottom-center" | "bottom-left" | "bottom-right" | "center-left" | "center-right" | "top-center" | "top-left" | "top-right"`. Default is `"center"`.
+
+## Example
```tsx twoslash
import { RemotionRiveCanvas } from "@remotion/rive";
@@ -22,3 +34,7 @@ function App() {
);
}
```
+
+## See also
+
+- [`@remotion/lottie`](/docs/lottie)
diff --git a/packages/rive/src/RemotionRiveCanvas.tsx b/packages/rive/src/RemotionRiveCanvas.tsx
index 923dc688a1..86173fc785 100644
--- a/packages/rive/src/RemotionRiveCanvas.tsx
+++ b/packages/rive/src/RemotionRiveCanvas.tsx
@@ -89,7 +89,6 @@ export const RemotionRiveCanvas: React.FC<RiveProps> = ({
return;
}
- console.log("hi");
riveCanvasInstance.requestAnimationFrame(() => {
if (!rive || !canvas.current) {
return;
diff --git a/vercel.json b/vercel.json
index d9c46a1b77..aa78102cc8 100644
--- a/vercel.json
+++ b/vercel.json
@@ -159,6 +159,11 @@
"source": "/resources",
"destination": "https://www.remotion.dev/docs/resources",
"permanent": false
+ },
+ {
+ "source": "/rive",
+ "destination": "https://www.remotion.dev/docs/rive",
+ "permanent": false
}
]
}