Skip to content

🎥 Make videos programmatically with React

Docs: Update `<Solid>` documentation

JonnyBurgerd8543b76cf5c
diff --git a/packages/docs/docs/solid.mdx b/packages/docs/docs/solid.mdx
index 36d229f341..b907202f51 100644
--- a/packages/docs/docs/solid.mdx
+++ b/packages/docs/docs/solid.mdx
@@ -7,8 +7,7 @@ crumb: 'API'
# &lt;Solid&gt;<AvailableFrom v="4.0.464" />
-Renders a solid-color rectangle on a `<canvas>` element.
-Use it for colored backgrounds or overlays in your composition.
+Renders a solid-color rectangle on a [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/canvas) element.
```tsx twoslash title="MyComp.tsx"
import {AbsoluteFill, Solid} from 'remotion';
@@ -35,19 +34,7 @@ Height of the canvas in pixels. Must be a positive integer.
### `color?`
Fill color of the rectangle.
-If omitted, the canvas stays transparent.
-
-```tsx twoslash title="Transparent background"
-import {AbsoluteFill, Solid} from 'remotion';
-
-export const MyComp: React.FC = () => {
- return (
- <AbsoluteFill>
- <Solid width={1920} height={1080} />
- </AbsoluteFill>
- );
-};
-```
+If omitted, it is `transparent`.
### `className?`
@@ -55,17 +42,16 @@ A class name to apply to the `<canvas>` element.
### `style?`
-Inline styles to apply to the `<canvas>` element.
-The component also supports the visual transform fields documented on [`<Sequence>`](/docs/sequence#style) (`style.translate`, `style.scale`, `style.rotate`).
+Inline styles to apply to the `<canvas>` element.
-## Sequence props
+## Inherited props
-`<Solid>` is wrapped in a [`<Sequence>`](/docs/sequence) with `layout="none"`.
-You can pass [`from`](/docs/sequence#from), [`durationInFrames`](/docs/sequence#durationinframes), [`name`](/docs/sequence#name) and other sequence props to time-shift the layer.
+`<Solid>` inherits [`from`](/docs/sequence#from), [`durationInFrames`](/docs/sequence#durationinframes), [`name`](/docs/sequence#name), [`showInTimeline`](/docs/sequence#showintimeline) and [`hidden`](/docs/sequence#hidden) from `<Sequence>`.
## Adding a ref
-You can add a [React ref](https://react.dev/learn/manipulating-the-dom-with-refs) to a `<Solid>` component. If you use TypeScript, type it with `HTMLCanvasElement`:
+You can add a [React ref](https://react.dev/learn/manipulating-the-dom-with-refs) to a `<Solid>` component.
+If you use TypeScript, type it with `HTMLCanvasElement`:
```tsx twoslash title="MyComp.tsx"
import {useRef} from 'react';
@@ -77,6 +63,11 @@ const MyComp = () => {
};
```
+## What is this component for?
+
+This is mainly a component for adding effects to.
+Effects are an upcoming feature of Remotion - if you are here, you are early!
+
## Compatibility
<CompatibilityTable chrome firefox safari nodejs="" bun="" serverlessFunctions="" clientSideRendering serverSideRendering player studio hideServers/>