Create electronics with Typescript and React. Compile Typescript to Circuit JSON
https://tscircuit.com β HEALTH ? 97 / Healthy
Create electronics with Typescript and React. Compile Typescript to Circuit JSON
https://tscircuit.com β// readme
The core logic used to build Circuit JSON from tscircuit React elements.
tscircuit Β· Online Playground Β· Development Guide Β· Core Benchmarks Β· Contributor Getting Started Video
You can use core to create Circuit JSON, which can then
be converted into Gerbers, viewed online, and much more.
import { Circuit } from "@tscircuit/core"
const circuit = new Circuit()
circuit.add(
<board width="10mm" height="10mm">
<resistor name="R1" resistance="10k" footprint="0402" />
<led name="L1" footprint="0402" />
<trace from="R1.pin1" to="net.VCC" />
<trace from="R1.pin2" to="L1.pos" />
<trace from="L1.neg" to="net.GND" />
</board>
)
circuit.getCircuitJson()
For high-level functional diagrams, use the systemblock namespace.
Coreβ¦