Back to Remotion

Star

packages/docs/docs/shapes/star.mdx

4.0.461734 B
Original Source

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

Part of the @remotion/shapes package.

Renders an SVG element containing a star.

Explorer

<Demo type="star" />

Example

tsx
import {Star} from '@remotion/shapes';
import {AbsoluteFill} from 'remotion';

export const MyComposition = () => {
  return (
    <AbsoluteFill
      style={{
        backgroundColor: 'white',
        justifyContent: 'center',
        alignItems: 'center',
      }}
    >
      <Star points={5} innerRadius={100} outerRadius={200} fill="red" />
    </AbsoluteFill>
  );
};

Props

<ShapeOptions shape="star" all />

See also

<ShapeSeeAlso shape="star" />