Design circuit boards with TypeScript and React.
tscircuit is an open-source electronics design tool. Describe components and connections in code, preview your schematic and PCB in 2D and 3D, and export manufacturing files to order real boards.
Use your favorite editor and AI coding tools, or try it in your browser.
Get started with npm install -g tscircuit. CLI quickstart →
From code to hardware: explore the source, schematic, PCB layout, and 3D view of these community projects.
RP2040 motor controller USB-C motor control · Manufactured board by imrishabh18 |
NEMA 23 stepper controller Motor-mounted controller · 3D render by imrishabh18 |
RP2040 BLDC controller Brushless motor control · 3D render by MustafaMulla29 |
More examples: ESP32 Wi-Fi breakout · Browse community circuits
The RP2040 motor controller also shows how a real design looks in 2D.
Schematic: USB programming, QSPI flash, and 3.3 V power. Click the image to zoom into the vector drawing.
PCB layout: top copper layer, with silkscreen hidden to make the routing easier to see.
- What is tscircuit?
- Examples
- Getting Started
- Features
- FAQs
- Development Sub-Projects / Organization
- Other Links
tscircuit turns TypeScript and React components into schematics, PCB layouts, 3D models, and manufacturing files. Instead of HTML elements like <div>, you write circuit elements like <chip>, <resistor>, and <trace>.
Build reusable circuit components, share them on the registry, and use the tsci CLI to preview and export your designs for manufacturing.
A simple voltage divider looks like this:
export default () => (
<board width="20mm" height="15mm">
<resistor name="R1" resistance="10k" footprint="0805" pcbX={-3} />
<resistor name="R2" resistance="10k" footprint="0805" pcbX={3} />
<trace from="net.VCC" to="R1.pin1" />
<trace from="R1.pin2" to="R2.pin1" />
<trace from="R2.pin1" to="net.OUT" />
<trace from="R2.pin2" to="net.GND" />
</board>
)Watch tscircuit in action
tscircuit-usage-video.2.mp4
whatistscircuit4.mp4
You can do everything you need to do with tscircuit using the tsci command line tool.
npm install -g tscircuit
tsci devOpen your browser to http://localhost:3020!
Edit your circuit code and preview the schematic, PCB layout, and 3D model as you work.
- Preview PCBs & Schematics in your browser
- Use normal Typescript/React tooling
- Export Gerbers, Pick'n'Place and BOM for manufacturing
- Add registry packages with
tsci add - Publish subpackages to the registry with
tsci push - Simplified, extensible auto-routing for PCBs
- Import footprints and components from third-party sites
- Generate footprints from text using AI
tscircuit is completely free and MIT-licensed open-source
tscircuit uses the same thing that React Native and react-three-fiber use to render to mobile or 3d to render PCBs and schematics (it's called React Fiber!)
You can render schematics or PCBs in any React project like this:
import { Schematic } from "@tscircuit/schematic-viewer"
export const MyApp = () => (
<div>Regular web react here!</div>
<Schematic>
<resistor name="R1" resistance="10k" />
</Schematic>
)tscircuit has a bunch of extra tools and exports in the command line, so it's a bit easier to use tsci dev to develop circuits (you can always publish and import them later)
Yes! There is a playground tool!
Currently you should specify pcbX/pcbY for components (and nest inside <group />s for convenience!)
We are working on building the equivalent of "flex" and "CSS Grid" autolayout algorithms for PCBs. Wherever an automatic placement is made, you'll be able to override it.
We are working towards a state-of-the-art web-based autorouting algorithm. You can follow the progress of our autorouter development on autorouting.com
Please create an issue!
- @seveibar is the main author, he tweets about tscircuit and does development livestreams
- @tscircuit for major tscircuit releases, features and discussions
- tscircuit discord and tscircuit campfire
tscircuit includes a lot of different independently-runnable sub-projects. Here's a quick guide to navigating all of the sub-projects:
| Project | Description |
|---|---|
| tscircuit | The main package, packages up everything into a single version |
| @tscircuit/core | A typescript-native library for building circuits (no React). Converts typescript into "the circuit-json format" |
| @tscircuit/cli | The tscircuit command line tool tsci and development environment |
| @tscircuit/tscircuit.com | The main website, playground and online development environment for tscircuit |
| @tscircuit/schematic-viewer | The Schematic renderer |
| @tscircuit/pcb-viewer | The PCB renderer |
| @tscircuit/react-fiber | Bindings from builder to React, React types |
| @tscircuit/routing | Routing algorithms for schematic and PCB traces |
| @tscircuit/autolayout | Layout algorithms for schematics |
| @tscircuit/footprinter | DSL for creating footprints |
| kicad-mod-converter | Convert kicad_mod files to and from JSON |
| @tscircuit/kicad-viewer | View the KiCad official footprints online |
- tscircuit.com - The official tscircuit website, registry and playground
- discord - Join the community server where all the primary conversations happen
- @seveibar - Twitter for author of tscircuit with dev sessions and upcoming features
