Skip to content

🎥 Make videos programmatically with React

scaffold docs

Jonny Burgere8d9fc6e98c9
diff --git a/packages/docs/docs/transitions/presentations/fade.md b/packages/docs/docs/transitions/presentations/fade.md
new file mode 100644
index 0000000000..b22d9037ed
--- /dev/null
+++ b/packages/docs/docs/transitions/presentations/fade.md
@@ -0,0 +1,6 @@
+---
+crumb: "@remotion/transitions - Presentations"
+title: "fade()"
+---
+
+fade
diff --git a/packages/docs/docs/transitions/presentations/index.md b/packages/docs/docs/transitions/presentations/index.md
new file mode 100644
index 0000000000..e1487c2c05
--- /dev/null
+++ b/packages/docs/docs/transitions/presentations/index.md
@@ -0,0 +1,6 @@
+---
+crumb: "@remotion/transitions"
+title: "Presentations"
+---
+
+Presentations
diff --git a/packages/docs/docs/transitions/presentations/slide.md b/packages/docs/docs/transitions/presentations/slide.md
new file mode 100644
index 0000000000..b93bdf0a51
--- /dev/null
+++ b/packages/docs/docs/transitions/presentations/slide.md
@@ -0,0 +1,6 @@
+---
+crumb: "@remotion/transitions - Presentations"
+title: "slide()"
+---
+
+slide
diff --git a/packages/docs/docs/transitions/presentations/wipe.md b/packages/docs/docs/transitions/presentations/wipe.md
new file mode 100644
index 0000000000..e9ec27c58e
--- /dev/null
+++ b/packages/docs/docs/transitions/presentations/wipe.md
@@ -0,0 +1,6 @@
+---
+crumb: "@remotion/transitions - Presentations"
+title: "wipe()"
+---
+
+wipe
diff --git a/packages/docs/docs/transitions/timings/index.md b/packages/docs/docs/transitions/timings/index.md
new file mode 100644
index 0000000000..3e2a483bf5
--- /dev/null
+++ b/packages/docs/docs/transitions/timings/index.md
@@ -0,0 +1 @@
+Timings
diff --git a/packages/docs/docs/transitions/timings/lineartiming.md b/packages/docs/docs/transitions/timings/lineartiming.md
new file mode 100644
index 0000000000..5da4d47d2b
--- /dev/null
+++ b/packages/docs/docs/transitions/timings/lineartiming.md
@@ -0,0 +1,6 @@
+---
+crumb: "@remotion/transitions - Timings"
+title: "linearTiming()"
+---
+
+Linear timing
diff --git a/packages/docs/docs/transitions/timings/springtiming.md b/packages/docs/docs/transitions/timings/springtiming.md
new file mode 100644
index 0000000000..48943674fd
--- /dev/null
+++ b/packages/docs/docs/transitions/timings/springtiming.md
@@ -0,0 +1,6 @@
+---
+crumb: "@remotion/transitions - Timings"
+title: "springTiming()"
+---
+
+Spring timing
diff --git a/packages/docs/docs/transitions/transitionseries.md b/packages/docs/docs/transitions/transitionseries.md
index 909ceeed77..613f6780d9 100644
--- a/packages/docs/docs/transitions/transitionseries.md
+++ b/packages/docs/docs/transitions/transitionseries.md
@@ -8,6 +8,17 @@ _available from v4.0.21_
The `<TransitionSeries>` component behaves the same as the [`<Series>`](/docs/series) component, but allows for `<TransitionSeries.Transition>` components to be rendered between `<TransitionSeries.Sequence>` components.
+Each transition consists of two parts:
+
+<Step>1</Step> <code>presentation</code>: The effect that is being used, for example <code>fade()</code> or <code>wipe()</code>.<br/>
+
+<Step>2</Step> <code>timing</code>: The duration and the progress curve, for example <code>springTiming()</code> or <code>linearTiming()</code>
+
+<br/>
+<br/>
+
+This package has some presentations and timings built-in, but custom ones can be created as well.
+
```tsx twoslash title="MyComp.tsx"
import { AbsoluteFill } from "remotion";
const Fill = ({ color }: { color: string }) => (
@@ -49,4 +60,34 @@ export const MyComp: React.FC = () => {
};
```
-The `<TransitionSeries>` component inherits the [`from`](/docs/sequence#from), [`name`](/docs/sequence#name), , [`style`](/docs/sequence#style) and [`layout`](/docs/sequence#layout)
+## API
+
+### `<TransitionSeries>`
+
+Inherits the [`from`](/docs/sequence#from), [`name`](/docs/sequence#name), [`className`](/docs/sequence#classname), [`style`](/docs/sequence#style) and [`layout`](/docs/sequence#layout) props from [`<Sequence>`](/docs/sequence).
+
+The `<TransitionSeries>` component can only contain `<TransitionSeries.Sequence>` and `<TransitionSeries.Transition>` components.
+
+### `<TransitionSeries.Sequence>`
+
+Inherits the [`durationInFrames`](/docs/sequence#durationinframes), [`name`](/docs/sequence#name), [`className`](/docs/sequence#classname), [`style`](/docs/sequence#style) and [`layout`](/docs/sequence#layout) props from [`<Sequence>`](/docs/sequence).
+
+As children, put the contents of your scene.
+
+### `<TransitionSeries.Transition>`
+
+Takes two props:
+
+- `timing`: A timing of type `TransitionTiming`. See [Timings](/docs/transitions/timings) for more information.
+- `presentation?`: A presentation of type `TransitionPresentation`. If not specified, the default value is `slide()`. See [Presentations](/docs/transitions/presentations) for more information.
+
+Must be a direct child of `<TransitionSeries>`.
+Must be between two `<TransitionSeries.Sequence>` components or the first or the last component to create an entrance or exit transition.
+It is not allowed for two `<TransitionSeries.Transition>` components to be next to each other.
+
+## See also
+
+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/transitions/src/TransitionSeries.tsx)
+- [Timings](/docs/transitions/timings)
+- [Presentations](/docs/transitions/presentations)
+- [`<Series>`](/docs/series)
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 4722ef456d..2247cd7122 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -394,7 +394,35 @@ module.exports = {
type: "doc",
id: "transitions/index",
},
- items: ["transitions/index", "transitions/transitionseries"],
+ items: [
+ "transitions/index",
+ {
+ type: "category",
+ label: "Timings",
+ link: {
+ type: "doc",
+ id: "transitions/timings/index",
+ },
+ items: [
+ "transitions/timings/springtiming",
+ "transitions/timings/lineartiming",
+ ],
+ },
+ {
+ type: "category",
+ label: "Presentations",
+ link: {
+ type: "doc",
+ id: "transitions/presentations/index",
+ },
+ items: [
+ "transitions/presentations/fade",
+ "transitions/presentations/slide",
+ "transitions/presentations/wipe",
+ ],
+ },
+ "transitions/transitionseries",
+ ],
},
{
type: "category",