🎥 Make videos programmatically with React
document new feature
Jonny Burger976d4b15c43e
diff --git a/packages/docs/docs/absolute-fill.md b/packages/docs/docs/absolute-fill.mdindex 7bbdf0e20c..4830acfed4 100644--- a/packages/docs/docs/absolute-fill.md+++ b/packages/docs/docs/absolute-fill.md@@ -18,6 +18,22 @@ A helper component - it is an absolutely positioned `<div>` with the following s}```+## Adding a ref++You can add a [React ref](https://reactjs.org/docs/refs-and-the-dom.html) to an `<AbsoluteFill>` from version `v3.2.13` on. If you use TypeScript, you need to type it with `HTMLDivElement`:++```tsx twoslash+import {useRef} from 'react';+import {AbsoluteFill} from 'remotion';++const content = <div>Hello, World</div>+// ---cut---+const MyComp = () => {+ const ref = useRef<HTMLDivElement>(null);+ return <AbsoluteFill ref={ref}>{content}</AbsoluteFill>+}+```+## See also- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/AbsoluteFill.tsx)diff --git a/packages/docs/docs/sequence.md b/packages/docs/docs/sequence.mdindex ce781135ee..032d2130c4 100644--- a/packages/docs/docs/sequence.md+++ b/packages/docs/docs/sequence.md@@ -161,6 +161,22 @@ const TrimAndDelayExample: React.FC = () => {See the [`<Series />`](/docs/series) helper component, which helps you calculate markup that makes sequences play after each other.+## Adding a ref++You can add a [React ref](https://reactjs.org/docs/refs-and-the-dom.html) to an `<Sequence>` from version `v3.2.13` on. If you use TypeScript, you need to type it with `HTMLDivElement`:++```tsx twoslash+import {useRef} from 'react';+import {Sequence} from 'remotion';++const content = <div>Hello, World</div>+// ---cut---+const MyComp = () => {+ const ref = useRef<HTMLDivElement>(null)+ return <Sequence from={10} ref={ref}>{content}</Sequence>+}+```+## See also- [Source code for this component](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/Sequence.tsx)