Back to Remotion

Pie

packages/docs/docs/shapes/pie.mdx

4.0.465789 B
Original Source

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

Part of the @remotion/shapes package.

Renders an SVG element drawing a pie piece.

Explorer

<Demo type="pie" />

Example

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

export const MyComposition = () => {
  return (
    <AbsoluteFill
      style={{
        backgroundColor: "white",
        justifyContent: "center",
        alignItems: "center",
      }}
    >
      <Pie
        radius={100}
        progress={0.5}
        fill="green"
        stroke="red"
        strokeWidth={1}
      />
    </AbsoluteFill>
  );
};

Props

<ShapeOptions shape="pie" all />

See also

<ShapeSeeAlso shape="pie"/>