diff --git a/examples/example21-connected-trace-hover.fixture.tsx b/examples/example21-connected-trace-hover.fixture.tsx
new file mode 100644
index 0000000..6e77ff1
--- /dev/null
+++ b/examples/example21-connected-trace-hover.fixture.tsx
@@ -0,0 +1,22 @@
+import { SchematicViewer } from "lib/components/SchematicViewer"
+import { renderToCircuitJson } from "lib/dev/render-to-circuit-json"
+
+const circuitJson = renderToCircuitJson(
+
+
+
+
+
+
+
+
+ ,
+)
+
+export default () => (
+
+)
diff --git a/lib/components/SchematicViewer.tsx b/lib/components/SchematicViewer.tsx
index ab4fd20..1ec6bc5 100644
--- a/lib/components/SchematicViewer.tsx
+++ b/lib/components/SchematicViewer.tsx
@@ -16,6 +16,7 @@ import {
import { useMouseMatrixTransform } from "use-mouse-matrix-transform"
import { useResizeHandling } from "../hooks/use-resize-handling"
import { useComponentDragging } from "../hooks/useComponentDragging"
+import { useHighlightConnectedSchematicTraces } from "../hooks/useHighlightConnectedSchematicTraces"
import type { ManualEditEvent } from "../types/edit-events"
import { EditIcon } from "./EditIcon"
import { GridIcon } from "./GridIcon"
@@ -345,6 +346,12 @@ export const SchematicViewer = ({
editEvents: editEventsWithUnappliedEditEvents,
})
+ useHighlightConnectedSchematicTraces({
+ svgDivRef,
+ circuitJson,
+ circuitJsonKey,
+ })
+
// Add group overlays when enabled
useSchematicGroupsOverlay({
svgDivRef,
@@ -396,6 +403,18 @@ export const SchematicViewer = ({
return (
+
{onSchematicComponentClicked && (