tscircuit core
Code-based PCB toolchain core: create electronics with TypeScript and React, compiling to Circuit JSON.
What it does and how it connects
tscircuit core is the core logic used to build Circuit JSON from tscircuit React elements. The user creates electronics with TypeScript and React: a Circuit holds a board with components such as resistors and LEDs and traces between them, and getCircuitJson returns the Circuit JSON, which can then be converted into Gerbers, viewed online, and much more.
The same elements work without React: Board, Resistor, Led, and Trace can be constructed directly and connected with connect calls. For high-level functional diagrams, the systemblock namespace resolves block positions, sizes, routes, and label anchors into Circuit JSON, ready for conversion to SVG.
The README is short and points outward: to the tscircuit repository, the online playground, a development guide, and a core benchmarks site. The repo also documents PCB return-current experiments declared in TSX.
Alternatives
Compare side by side- tscircuit
The full code-based PCB toolchain and site, rather than the core library that compiles React elements to Circuit JSON.
- atopile
Describes boards in the atopile language and compiles them to KiCad, rather than building Circuit JSON from TypeScript and React.
- diodeinc/pcb
Describes schematics in Zener, a Starlark-based language, and generates KiCad layouts, rather than compiling React elements to Circuit JSON.
- pcbkit
Generates KiCad boards from Python code, rather than building Circuit JSON from TypeScript and React.
- circuit-json-to-kicad
Converts Circuit JSON into KiCad schematics and layouts, consuming what core produces, rather than producing Circuit JSON.
Recurring errors it addresses
Error Index entries this tool is built to reduce or work around.
- Six SMT pad fields are lost on native render or Circuit JSON footprint import, corner radius, four directional soldermask margins and solderpaste margin, so 2 x 1 mm pads with paste margins produced three default 1.4 x 0.7 mm apertures instead of 1.8 x 0.8, 2 x 1 and 2.2 x 1.Error Index
- An oversized via can leave an inner BGA pad with no legal escape and the autorouter burns time routing before failing, and separately 18 of 100 routing tests fail on an unchanged checkout.Error Index
- All six top/bottom anchor cases in getPcbTextBounds put the Y offset in the wrong direction, so silkscreen overlap checks ran against a box on the wrong side.Error Index
- A trace written to U1.pin2 quietly attached to an internal pad port instead, with no error, so the net never reached the copper.Error Index
Sources
Not verified
- No GitHub releases exist, so latest release fields are null.
- Pricing: none stated on the repo.
- Real user voices: recent repo activity is maintainer pull requests.
- Detailed capabilities beyond the short README: the README is 2 KB and points to the development guide and benchmarks site.
Last verified November 6, 2026. Listings are informational. The evidence score measures public, verifiable evidence and is not an endorsement or a compatibility claim.