Importing Modules and Chips
Running tscircuit
- Building a Static Site:
tsci build --site
packages your tscircuit project into a static website that anyone can browse without running a server. - Connect GitHub Repositories to tscircuit: You can connect your GitHub repositories to tscircuit to automatically
- Displaying Circuit JSON on a Webpage: Circuit JSON is a universal
- Platform Configuration: The Platform Configuration allows you to change tscircuit behavior to best suit the platform the tscircuit code is running on.
- Programmatically Building Circuits: This guide is about using tscircuit inside of scripts, APIs or inside the browser. Maybe you want to create a website that allows your users drag'n'drop to create custom electronics and turn their designs into real circuits automatically.
- Running tscircuit inside an iframe: tscircuit can be evaluated inside an iframe. This makes it easy to embed snippets on a webpage without complex build systems.
- Running tscircuit with a script tag: Load
tscircuit
's browser build from a CDN and render a circuit written inside a<script type="tscircuit-tsx">
block – no build tooling required. - Using tscircuit without React: {/* tscircuit uses React by default for strong guarantees about how
Circuit Generation
TypeScript Guide
tscircuit Essentials
- Essential Elements: There are some essential elements you'll need for almost every circuit you make, this doc gives a brief overview of each of them so you can jump right in and get started building electronics!
- Configuring Chips
- Automatic PCB Layout: Automatic layout is in beta! We're changing and improving the layout algorithms,
- Automatic Schematic Layout: Automatic layout is in beta! We're changing and improving the layout algorithms,
- Using Layout Properties: There are many ways to layout your schematic and PCB with tscircuit including automatic layout and manual edits. In this article we'll discuss how to programmatically lay out a board using layout properties like
schX
/schY
andpcbX
andpcbY
- Manual Edits: It can be cumbersome to programmatically define the locations of every component
- Pinout SVG: You can generate a pinout diagram for your board. This is useful for creating reference diagrams for modules or development boards.
- Port and Net Selectors: Selectors are a string used to reference a port, net or any component. They're most
- tscircuit.config.json: Configure your tscircuit project settings
- Using Expressions for Component Values: Tscircuit lets you use normal JavaScript expressions to calculate component values. This is useful when a part's value depends on other parameters, like setting a voltage divider's output or picking the capacitor for an LC resonant circuit.
- Using Groups for PCB Layout: Groups can help you break up your layout problem into smaller, more manageable and reusable parts.
- Using "sel" References: The sel object is a special import that allows you to easily reference
Understanding Fabrication Files
Fabrication files are files that can be uploaded to a fabricator or turn-key manufacturer to get an entire circuit board made. tscircuit includes three main types of files inside our fabrication files zip
: