🎥 Make videos programmatically with React
document still
Jonny Burgerfb4e08e9c271
diff --git a/packages/docs/docs/composition.md b/packages/docs/docs/composition.mdindex d76419e79e..5ba99610e0 100644--- a/packages/docs/docs/composition.md+++ b/packages/docs/docs/composition.md@@ -89,3 +89,4 @@ export const MyVideo = () => {- [registerRoot()](/docs/register-root)- [The fundamentals](/docs/the-fundamentals)- [CLI options](/docs/cli)+- [`<Still />`](/docs/still)diff --git a/packages/docs/docs/still.md b/packages/docs/docs/still.mdnew file mode 100644index 0000000000..61054aa747--- /dev/null+++ b/packages/docs/docs/still.md@@ -0,0 +1,46 @@+---+id: still+title: <Still />+---++A `<Still />` is a [`<Composition />`](/docs/composition) that is only 1 frame long. It is a convienience component for defining a composition that is meant to be rendered an image rather than a video.++## Example++The `<Still />` component has the same API as a [`<Composition />`](/docs/composition) except it's not necessary to pass `durationInFrames` and `fps`.++```tsx twoslash+// @allowUmdGlobalAccess+// @filename: ./MyComp.tsx+export const MyComp = () => <></>++// @filename: index.tsx+// ---cut---+import {Composition, Still} from 'remotion'+import {MyComp} from './MyComp'++export const MyVideo = () => {+ return (+ <>+ <Composition+ id="my-video"+ component={MyComp}+ width={1080}+ height={1080}+ fps={30}+ durationInFrames={3 * 30}+ />+ <Still+ id="my-image"+ component={MyComp}+ width={1080}+ height={1080}+ />+ </>+ )+}+```++## See also++- [`<Composition />`](/docs/composition)diff --git a/packages/docs/docs/the-fundamentals.md b/packages/docs/docs/the-fundamentals.mdindex 5f0a75de93..62c7ec883b 100644--- a/packages/docs/docs/the-fundamentals.md+++ b/packages/docs/docs/the-fundamentals.md@@ -18,14 +18,14 @@ export const MyVideo = () => {// - MyVideo```-The basic idea behind Remotion is that you get a frame number and blank canvas to render anything you want.--You express those ideas using **[React](https://reactjs.org)**.+The basic idea behind Remotion is that we'll give you a frame number and a blank canvas, and the freedom to render anything you want using **[React.js](https://reactjs.org)**.```tsx twoslash// @include: example-MyVideo```+A video is a function of images over time. If you change content every frame, you'll end up with an animation.+## Video propertiesA video has 4 properties:@@ -78,3 +78,5 @@ export const RemotionVideo: React.FC = () => {```Remember that if you like, you can register multiple compositions that rely on the same component. For example, if you like to make a square video for social media feeds, and a portrait video for Stories, you can reuse the component and try to make it 'responsive'.++Besides the `<Composition />` component, you can also render a [`<Still />`](/docs/still) component and define a still image rather than a video.diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 633fe89ccd..4308aaae17 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -64,6 +64,7 @@ module.exports = {"img","iframe","freeze",+ "still","easing",],},