# Circle
[Full-page experience](/experience/circle/) · [Open playground](/playground/#/examples/drawing/circle)

Draw a round mark from an explicit center and radius.

## Try it

Click the coral circle to change its fill.

## What to learn

- Set a circle center, radius, fill, and outline in one local style object.
- Use the filled interior as an intentional click target.

## Integration boundaries

- Circle radius percentages resolve against the smaller available axis.
- Fill geometry is used for clicks while the dark outline remains a stroke.

This is a Pibbl Canvas example. Its mount owns its runtime resources; call its controller's dispose method when removing it. The preview starts automatically unless reduced motion is enabled; Stop disposes the mount. Preserve the source's logical canvas size and aspect ratio. Native HTML is not captured by Canvas filters.

## Related APIs

- [Circle](/reference/components/circle/)

## Complete source

Host setup for this source: use a canvas with width 720 and height 420, compile with `jsx: "react-jsx"` and `jsxImportSource: "@pibbl/core"`, import its default `mount`, and call `const controller = mount(canvas)` after attaching the canvas. Call `controller.dispose()` before removing it.

### circle.example.tsx

```tsx
import { Circle, pibbl, useSignal, Rectangle, type PibblController } from "@pibbl/core";

function CircleStudy() {
  const active = useSignal(false);

  return [
    <Rectangle
      style={{ left: 0, top: 0, width: 720, height: 420, fill: "#f7f0df" }}
    />,
    <Circle
      style={{
        cx: 360,
        cy: 210,
        radius: 110,
        fill: active.get() ? "#74d3ae" : "#ff6b57",
        stroke: "#17211d",
        strokeWidth: 6,
        cursor: "pointer",
      }}
      onClick={() => active.update((value) => !value)}
    />,
  ];
}

export default function mount(canvas: HTMLCanvasElement): PibblController {
  return pibbl(canvas, <CircleStudy />);
}

```

## Documentation version

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