GitHub

Ellipse

The <Ellipse /> element is used to create an ellipse.

An ellipse is closely related to a circle. The difference is that an ellipse has an x and a y radius that differs from each other, while a circle has equal x and y radius.

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

const Lenses = () => (
  <Svg viewBox="0 0 120 60" width={240} height={120}>
    <Ellipse cx="48" cy="30" rx="34" ry="20" fill="#e82200" />
    <Ellipse cx="72" cy="30" rx="34" ry="20" fill="#8d1602" opacity={0.75} />
  </Svg>
);
Show preview

Valid props

Prop nameDescriptionTypeDefault
cxThe x position of the ellipse.String, Numberundefined
cyThe y position of the ellipse.String, Numberundefined
rxThe radius of the ellipse on the x axis.String, Numberundefined
ryThe radius of the ellipse on the y axis.String, Numberundefined

See also Presentation Attributes

On this page