---
title: renderer
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/canvas/renderer
---

# renderer

The drawing callback that you use to draw into the canvas.

## Declaration

```swift
var renderer: (inout GraphicsContext, CGSize) -> Void
```

## Parameters

- `context`: The graphics context to draw into.
- `size`: The current size of the view.

## See Also

### Rendering

- [rendersAsynchronously](swiftui/canvas/rendersasynchronously.md)
