# Ellipse

```ts
import { Ellipse } from "@pibbl/core";
```

`Ellipse` uses [`EllipseProps`](/reference/types/elements-components/#ellipseprops) and [`EllipseStyle`](/reference/types/styles/#ellipsestyle). It requires nonnegative
`radiusX` and `radiusY`; `rotation` is finite radians. It rejects children and
uses the same rotated geometry for paint, targeting, and default focus bounds.

```tsx
<Ellipse
  style={{
    cx: 100,
    cy: 70,
    radiusX: 72,
    radiusY: 34,
    rotation: 0.35,
    fill: "#38bdf8",
  }}
/>
```

Try the [Ellipse live example](/playground/#/examples/drawing/ellipse).

## API details from source

<span id="api-Ellipse"></span>

Describes an ellipse primitive for JSX or createElement authoring.

```ts
Ellipse: PibblPrimitiveComponent<EllipseProps, PrimitiveInput<EllipseProps, EllipseStyle>>
```

Related API: [Ellipse](/reference/components/ellipse/), [PibblPrimitiveComponent](/reference/types/elements-components/#pibblprimitivecomponent), [EllipseProps](/reference/types/elements-components/#ellipseprops), [PrimitiveInput](/reference/types/styles/#primitiveinput), [EllipseStyle](/reference/types/styles/#ellipsestyle).

### Parameters

- **`props`** — Authored component inputs, supplied through JSX or createElement. See the linked
props and style types.

### Throws

When called directly; Pibbl mounts this component through JSX or createElement.

### See also

[EllipseProps](/reference/types/elements-components/#ellipseprops)

[EllipseStyle](/reference/types/styles/#ellipsestyle)

[View source — packages/core/src/lib/components/ellipse.ts:117](/source/packages/core/src/lib/components/ellipse-ts/#L117)

## Implementation guidance for agents

Read the [Drawing, layout, and effects companion](/agents/topics/layout/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal example

Compile this TSX module with `jsx: "react-jsx"` and `jsxImportSource: "@pibbl/core"`, then load it from a browser entry point after the document body exists. It creates and mounts one canvas; dispose the controller before removing or replacing that canvas. The interactive study linked below adds controls beyond this minimal use case.

[Download source](/minimal/ellipse.tsx)

```tsx
/** @jsxImportSource @pibbl/core */
import { pibbl, Ellipse } from '@pibbl/core';

const canvas = document.createElement('canvas');
canvas.width = 320;
canvas.height = 240;
document.body.append(canvas);

const controller = pibbl(canvas, (
<Ellipse
  style={{
    cx: 100,
    cy: 70,
    radiusX: 72,
    radiusY: 34,
    rotation: 0.35,
    fill: "#38bdf8",
  }}
/>
));

window.addEventListener('pagehide', () => controller.dispose(), { once: true });
```

## Complete minimal examples

- [Rounded and circular marks](/minimal-examples/drawing/round-shapes/): Draw a circle, ellipse, rounded rectangle, arc, and wedge with typed props and styles. [Plain source](/minimal/drawing/round-shapes.tsx)
## Interactive examples

- [Ellipse](/examples/ellipse/) · [Full page](/experience/ellipse/)
## Documentation version

Documentation built with @pibbl/core 0.0.2, revision 272a94a. ALPHA — NOT FOR PRODUCTION USE.
