GitHub

Circle

The <Circle /> element is used to create a circle.

import { Svg, Circle } from '@react-pdf/renderer';

const Rings = () => (
  <Svg viewBox="0 0 120 60" width={240} height={120}>
    <Circle cx="48" cy="30" r="24" fill="#e82200" />
    <Circle cx="72" cy="30" r="24" fill="#8d1602" opacity={0.75} />
  </Svg>
);
Show preview

Valid props

Prop nameDescriptionTypeDefault
cxThe x-axis coordinate of the center of the circle.String, Numberundefined
cyThe y-axis coordinate of the center of the circle.String, Numberundefined
rThe radius of the circle.String, Numberundefined

See also Presentation Attributes

On this page