diff --git a/examples/canvas_graph_prototype.html b/examples/canvas_graph_prototype.html
new file mode 100644
index 0000000..8f0e5e9
--- /dev/null
+++ b/examples/canvas_graph_prototype.html
@@ -0,0 +1,779 @@
+
+
+
+
+
+
+
+ Click a node to inspect
+
+
+
+
+
+
diff --git a/tests/html/keyboard_support.js b/examples/keyboard_support.js
similarity index 100%
rename from tests/html/keyboard_support.js
rename to examples/keyboard_support.js
diff --git a/tests/html/mouse_support.js b/examples/mouse_support.js
similarity index 100%
rename from tests/html/mouse_support.js
rename to examples/mouse_support.js
diff --git a/tests/html/test_keyboard_support.html b/examples/test_keyboard_support.html
similarity index 100%
rename from tests/html/test_keyboard_support.html
rename to examples/test_keyboard_support.html
diff --git a/tests/html/test_mouse_support.html b/examples/test_mouse_support.html
similarity index 100%
rename from tests/html/test_mouse_support.html
rename to examples/test_mouse_support.html
diff --git a/src/myfasthtml/assets/core/hierarchical_canvas_graph.css b/src/myfasthtml/assets/core/hierarchical_canvas_graph.css
new file mode 100644
index 0000000..8d717d2
--- /dev/null
+++ b/src/myfasthtml/assets/core/hierarchical_canvas_graph.css
@@ -0,0 +1,99 @@
+/**
+ * Hierarchical Canvas Graph Styles
+ *
+ * Styles for the canvas-based hierarchical graph visualization control.
+ */
+
+/* Main control wrapper */
+.mf-hierarchical-canvas-graph {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+}
+
+/* Container that holds the canvas */
+.mf-hcg-container {
+ flex: 1;
+ position: relative;
+ overflow: hidden;
+ background: #0d1117;
+ width: 100%;
+ height: 100%;
+}
+
+/* Toggle button positioned absolutely within container */
+.mf-hcg-container button {
+ font-family: inherit;
+ user-select: none;
+}
+
+/* Canvas element (sized by JavaScript) */
+.mf-hcg-container canvas {
+ display: block;
+ width: 100%;
+ height: 100%;
+ cursor: grab;
+}
+
+.mf-hcg-container canvas:active {
+ cursor: grabbing;
+}
+
+/* Optional: toolbar/controls overlay (if needed in future) */
+.mf-hcg-toolbar {
+ position: absolute;
+ top: 12px;
+ left: 12px;
+ background: rgba(22, 27, 34, 0.92);
+ border: 1px solid #30363d;
+ border-radius: 8px;
+ padding: 6px;
+ display: flex;
+ gap: 6px;
+ align-items: center;
+ backdrop-filter: blur(4px);
+ z-index: 10;
+}
+
+/* Layout toggle button */
+.mf-hcg-toggle-btn {
+ position: absolute;
+ top: 12px;
+ right: 12px;
+ width: 32px;
+ height: 32px;
+ background: rgba(22, 27, 34, 0.92);
+ border: 1px solid #30363d;
+ border-radius: 6px;
+ color: #7d8590;
+ font-size: 16px;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ backdrop-filter: blur(4px);
+ transition: color 0.15s, background 0.15s;
+ z-index: 10;
+ padding: 0;
+ line-height: 1;
+}
+
+.mf-hcg-toggle-btn:hover {
+ color: #e6edf3;
+ background: #1c2128;
+}
+
+/* Optional: loading state */
+.mf-hcg-container.loading::after {
+ content: 'Loading...';
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ color: #7d8590;
+ font-size: 14px;
+ font-family: system-ui, sans-serif;
+}
diff --git a/src/myfasthtml/assets/core/hierarchical_canvas_graph.js b/src/myfasthtml/assets/core/hierarchical_canvas_graph.js
new file mode 100644
index 0000000..7ca41ff
--- /dev/null
+++ b/src/myfasthtml/assets/core/hierarchical_canvas_graph.js
@@ -0,0 +1,617 @@
+/**
+ * Hierarchical Canvas Graph
+ *
+ * Canvas-based visualization for hierarchical graph data with expand/collapse.
+ * Features: Reingold-Tilford layout, zoom/pan, search filter, dot grid background.
+ */
+
+/**
+ * Initialize hierarchical canvas graph visualization.
+ *
+ * Creates an interactive canvas-based hierarchical graph with the following features:
+ * - Reingold-Tilford tree layout algorithm
+ * - Expand/collapse nodes with children
+ * - Zoom (mouse wheel) and pan (drag) controls
+ * - Layout mode toggle (horizontal/vertical)
+ * - Search/filter nodes by label or kind
+ * - Click events for node selection and toggle
+ * - Stable zoom on container resize
+ * - Dot grid background (Figma-style)
+ *
+ * @param {string} containerId - The ID of the container div element
+ * @param {Object} options - Configuration options
+ * @param {Array