diff --git a/apps/examples/src/examples/OnTheCanvas.tsx b/apps/examples/src/examples/OnTheCanvas.tsx
new file mode 100644
index 000000000..ded21d4bf
--- /dev/null
+++ b/apps/examples/src/examples/OnTheCanvas.tsx
@@ -0,0 +1,87 @@
+import { stopEventPropagation, Tldraw, TLEditorComponents, track, useEditor } from '@tldraw/tldraw'
+import '@tldraw/tldraw/tldraw.css'
+import { useState } from 'react'
+
+// The "OnTheCanvas" component is rendered on top of the canvas, but behind the UI.
+function MyComponent() {
+ const [state, setState] = useState(0)
+
+ return (
+ <>
+
+ The count is {state}!
+
+
+ The count is {state}!
+
+ >
+ )
+}
+
+// The "InFrontOfTheCanvas" component is rendered on top of the canvas, but behind the UI.
+const MyComponentInFront = track(() => {
+ const editor = useEditor()
+ const { selectionRotatedPageBounds } = editor
+
+ if (!selectionRotatedPageBounds) return null
+
+ const pageCoordinates = editor.pageToScreen(selectionRotatedPageBounds.point)
+
+ return (
+
+ This does not scale with the zoom
+
+ )
+})
+
+const components: Partial = {
+ OnTheCanvas: MyComponent,
+ InFrontOfTheCanvas: MyComponentInFront,
+ SnapLine: null,
+}
+
+export default function OnTheCanvasExample() {
+ return (
+
+
+
+ )
+}
diff --git a/apps/examples/src/index.tsx b/apps/examples/src/index.tsx
index 9e66a290a..6a4831a34 100644
--- a/apps/examples/src/index.tsx
+++ b/apps/examples/src/index.tsx
@@ -26,6 +26,7 @@ import ExternalContentSourcesExample from './examples/ExternalContentSourcesExam
import HideUiExample from './examples/HideUiExample'
import MetaExample from './examples/MetaExample'
import MultipleExample from './examples/MultipleExample'
+import OnTheCanvasExample from './examples/OnTheCanvas'
import PersistenceExample from './examples/PersistenceExample'
import ReadOnlyExample from './examples/ReadOnlyExample'
import ScrollExample from './examples/ScrollExample'
@@ -84,6 +85,11 @@ export const allExamples: Example[] = [
path: 'readonly',
element: ,
},
+ {
+ title: 'Things on the canvas',
+ path: 'things-on-the-canvas',
+ element: ,
+ },
{
title: 'Scroll example',
path: 'scroll',
diff --git a/packages/editor/api-report.md b/packages/editor/api-report.md
index 8624fb674..6c50d83f7 100644
--- a/packages/editor/api-report.md
+++ b/packages/editor/api-report.md
@@ -2244,6 +2244,9 @@ export type TLHoveredShapeIndicatorComponent = ComponentType<{
shapeId: TLShapeId;
}>;
+// @public (undocumented)
+export type TLInFrontOfTheCanvas = ComponentType