openpencil/packages/docs/programmable/sdk/api/components/canvas-surface.md

17 lines
484 B
Markdown
Raw Normal View History

---
title: CanvasSurface
description: Canvas element primitive that binds to the nearest CanvasRoot context.
---
# CanvasSurface
`CanvasSurface` renders the actual `<canvas>` element used by the SDK canvas stack.
Use it inside `CanvasRoot` when you want SDK-managed canvas refs and rendering integration, but app-owned layout and styling.
## Related APIs
- [CanvasRoot](./canvas-root)
- [useCanvasContext](../advanced/use-canvas-context)
- [useCanvas](../composables/use-canvas)