Skip to main content

<Rect />

import {ShapeSeeAlso, ShapeOptions} from "../../components/shapes/shapes-info"

Part of the @remotion/shapes package.

Renders an SVG element containing a rectangle.

Explorer

Example

src/Rect.tsx
tsx
import { Rect } from "@remotion/shapes";
import { AbsoluteFill } from "remotion";
 
export const MyComposition = () => {
return (
<AbsoluteFill
style={{
backgroundColor: "white",
justifyContent: "center",
alignItems: "center",
}}
>
<Rect width={200} height={200} fill="red" />
</AbsoluteFill>
);
};
src/Rect.tsx
tsx
import { Rect } from "@remotion/shapes";
import { AbsoluteFill } from "remotion";
 
export const MyComposition = () => {
return (
<AbsoluteFill
style={{
backgroundColor: "white",
justifyContent: "center",
alignItems: "center",
}}
>
<Rect width={200} height={200} fill="red" />
</AbsoluteFill>
);
};

Props

See also