Back to Remotion

Polygon

packages/docs/docs/shapes/polygon.mdx

4.0.460721 B
Original Source

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

Part of the @remotion/shapes package.

Renders an SVG element containing a polygon.

Explorer

<Demo type="polygon"/>

Example

tsx
import { Polygon } from "@remotion/shapes";
import { AbsoluteFill } from "remotion";

export const MyComposition = () => {
  return (
    <AbsoluteFill
      style={{
        backgroundColor: "white",
        justifyContent: "center",
        alignItems: "center",
      }}
    >
      <Polygon points={5} radius={80} />
    </AbsoluteFill>
  );
};

Props

<ShapeOptions shape="polygon" all />

See also

<ShapeSeeAlso shape="polygon"/>