# Wedge

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

`Wedge` uses [`WedgeProps`](/reference/types/elements-components/#wedgeprops) and [`WedgeStyle`](/reference/types/styles/#wedgestyle). It shares Arc's radius and radian
sweep inputs but closes partial sweeps to the center, so their radial edges
participate in painting and targeting. Full turns avoid a seam; annular sectors
are not part of this component.

```tsx
<Wedge
  style={{
    cx: 80,
    cy: 80,
    radius: 56,
    startAngle: -1.2,
    endAngle: 1.1,
    fill: "#f97316",
  }}
/>
```

See the [Wedge live example](/playground/#/examples/drawing/wedge).

## API details from source

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

Describes a center-closed circular wedge primitive for JSX or createElement authoring.

```ts
Wedge: PibblPrimitiveComponent<WedgeProps, PrimitiveInput<WedgeProps, WedgeStyle>>
```

Related API: [Wedge](/reference/components/wedge/), [PibblPrimitiveComponent](/reference/types/elements-components/#pibblprimitivecomponent), [WedgeProps](/reference/types/elements-components/#wedgeprops), [PrimitiveInput](/reference/types/styles/#primitiveinput), [WedgeStyle](/reference/types/styles/#wedgestyle).

### 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

[WedgeProps](/reference/types/elements-components/#wedgeprops)

[WedgeStyle](/reference/types/styles/#wedgestyle)

[View source — packages/core/src/lib/components/wedge.ts:143](/source/packages/core/src/lib/components/wedge-ts/#L143)

## 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/wedge.tsx)

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

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

const controller = pibbl(canvas, (
<Wedge
  style={{
    cx: 80,
    cy: 80,
    radius: 56,
    startAngle: -1.2,
    endAngle: 1.1,
    fill: "#f97316",
  }}
/>
));

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

- [Wedge](/examples/wedge/) · [Full page](/experience/wedge/)
## Documentation version

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