---
title: useCanvasContext
description: Primitive context helper for CanvasRoot descendants.
---

# useCanvasContext

`useCanvasContext()` reads the local canvas context provided by `CanvasRoot`.

Use it inside descendants like `CanvasSurface` or your own custom canvas children.

## Related APIs

- [CanvasRoot](../components/canvas-root)
- [CanvasSurface](../components/canvas-surface)
