Skip to content

🎥 Make videos programmatically with React

Docs: Use Solid in generate effect examples (#7966)

Jonny Burger8d74eab3db01
diff --git a/packages/docs/docs/effects/halftone-linear-gradient.mdx b/packages/docs/docs/effects/halftone-linear-gradient.mdx
index d5f2b42fde..3c1ff1c261 100644
--- a/packages/docs/docs/effects/halftone-linear-gradient.mdx
+++ b/packages/docs/docs/effects/halftone-linear-gradient.mdx
@@ -21,15 +21,16 @@ Use it for dot-pattern wipes, overlays, and backgrounds on canvas-based componen
## Example
```tsx twoslash title="MyComp.tsx"
-import {AbsoluteFill} from 'remotion';
-import {Video} from '@remotion/media';
+import {AbsoluteFill, Solid} from 'remotion';
import {halftoneLinearGradient} from '@remotion/effects/halftone-linear-gradient';
export const MyComp: React.FC = () => {
return (
<AbsoluteFill>
- <Video
- src="https://remotion.media/video.mp4"
+ <Solid
+ width={1280}
+ height={720}
+ color="black"
effects={[
halftoneLinearGradient({
firstStopDotSize: 0,
@@ -49,15 +50,16 @@ export const MyComp: React.FC = () => {
To use colors from the previous effect in the chain, set `colorMode` to `'source'`:
```tsx twoslash title="MyComp.tsx"
-import {AbsoluteFill} from 'remotion';
-import {Video} from '@remotion/media';
+import {AbsoluteFill, Solid} from 'remotion';
import {halftoneLinearGradient} from '@remotion/effects/halftone-linear-gradient';
export const MyComp: React.FC = () => {
return (
<AbsoluteFill>
- <Video
- src="https://remotion.media/video.mp4"
+ <Solid
+ width={1280}
+ height={720}
+ color="#0b84f3"
effects={[
halftoneLinearGradient({
firstStopDotSize: 8,
diff --git a/packages/docs/docs/effects/lines.mdx b/packages/docs/docs/effects/lines.mdx
index 49f6afb8bc..df99d8900d 100644
--- a/packages/docs/docs/effects/lines.mdx
+++ b/packages/docs/docs/effects/lines.mdx
@@ -22,16 +22,16 @@ Each line color is composited over the source.
```tsx twoslash title="MyComp.tsx"
import {lines} from '@remotion/effects/lines';
-import {Video} from '@remotion/media';
-import {AbsoluteFill, useCurrentFrame} from 'remotion';
+import {AbsoluteFill, Solid, useCurrentFrame} from 'remotion';
export const MyComp: React.FC = () => {
const frame = useCurrentFrame();
return (
<AbsoluteFill>
- <Video
- src="https://remotion.media/video.mp4"
+ <Solid
+ width={1280}
+ height={720}
effects={[
lines({
colors: ['#dff4ff', '#7cc6ff'],
diff --git a/packages/docs/docs/effects/noise.mdx b/packages/docs/docs/effects/noise.mdx
index b7b47b9528..c30ca9e3ff 100644
--- a/packages/docs/docs/effects/noise.mdx
+++ b/packages/docs/docs/effects/noise.mdx
@@ -21,15 +21,16 @@ The effect preserves the source alpha mask. Transparent regions stay transparent
## Example
```tsx twoslash title="MyComp.tsx"
-import {AbsoluteFill} from 'remotion';
-import {Video} from '@remotion/media';
+import {AbsoluteFill, Solid} from 'remotion';
import {noise} from '@remotion/effects/noise';
export const MyComp: React.FC = () => {
return (
<AbsoluteFill>
- <Video
- src="https://remotion.media/video.mp4"
+ <Solid
+ width={1280}
+ height={720}
+ color="black"
effects={[
noise({
amount: 0.25,
diff --git a/packages/docs/docs/effects/waves.mdx b/packages/docs/docs/effects/waves.mdx
index c16c32ef09..c7fb687ea3 100644
--- a/packages/docs/docs/effects/waves.mdx
+++ b/packages/docs/docs/effects/waves.mdx
@@ -22,16 +22,16 @@ Colors are composited over the source.
```tsx twoslash title="MyComp.tsx"
import {waves} from '@remotion/effects/waves';
-import {Video} from '@remotion/media';
-import {AbsoluteFill, useCurrentFrame} from 'remotion';
+import {AbsoluteFill, Solid, useCurrentFrame} from 'remotion';
export const MyComp: React.FC = () => {
const frame = useCurrentFrame();
return (
<AbsoluteFill>
- <Video
- src="https://remotion.media/video.mp4"
+ <Solid
+ width={1280}
+ height={720}
effects={[
waves({
colors: ['#dff4ff', '#7cc6ff'],
diff --git a/packages/docs/docs/effects/white-noise.mdx b/packages/docs/docs/effects/white-noise.mdx
index 0d61545c84..8cb89ffbd4 100644
--- a/packages/docs/docs/effects/white-noise.mdx
+++ b/packages/docs/docs/effects/white-noise.mdx
@@ -29,15 +29,16 @@ The effect preserves the source alpha mask. Transparent regions stay transparent
## Example
```tsx twoslash title="MyComp.tsx"
-import {AbsoluteFill} from 'remotion';
-import {Video} from '@remotion/media';
+import {AbsoluteFill, Solid} from 'remotion';
import {whiteNoise} from '@remotion/effects/white-noise';
export const MyComp: React.FC = () => {
return (
<AbsoluteFill>
- <Video
- src="https://remotion.media/video.mp4"
+ <Solid
+ width={1280}
+ height={720}
+ color="black"
effects={[
whiteNoise({
amount: 1,
diff --git a/packages/docs/docs/effects/zigzag.mdx b/packages/docs/docs/effects/zigzag.mdx
index e542b7ecd9..6d79bfb7ab 100644
--- a/packages/docs/docs/effects/zigzag.mdx
+++ b/packages/docs/docs/effects/zigzag.mdx
@@ -22,16 +22,16 @@ It uses the same band controls as [`lines()`](/docs/effects/lines), and the same
```tsx twoslash title="MyComp.tsx"
import {zigzag} from '@remotion/effects/zigzag';
-import {Video} from '@remotion/media';
-import {AbsoluteFill, useCurrentFrame} from 'remotion';
+import {AbsoluteFill, Solid, useCurrentFrame} from 'remotion';
export const MyComp: React.FC = () => {
const frame = useCurrentFrame();
return (
<AbsoluteFill>
- <Video
- src="https://remotion.media/video.mp4"
+ <Solid
+ width={1280}
+ height={720}
effects={[
zigzag({
colors: ['#d7b8ff', 'transparent'],