Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 672 Bytes

File metadata and controls

21 lines (17 loc) · 672 Bytes

@tscircuit/schematic-viewer

React component for viewing Circuit JSON or tscircuit as a schematic

image
import { SchematicViewer } from "@tscircuit/schematic-viewer"

export default () => (
  <SchematicViewer
    circuitJson={renderToCircuitJson(
      <board width="10mm" height="10mm">
        <resistor name="R1" resistance={1000} schX={-2} />
        <capacitor name="C1" capacitance="1uF" schX={2} />
        <trace from=".R1 .pin2" to=".C1 .pin1" />
      </board>
    )}
  />
)