Importing Modules and Chips
- Importing from JLCPCB: JLCPCB has a massive component catalog of 3d models and footprints.
- Importing from KiCad: You can import KiCad components or projects into tscircuit.
- Installing KiCad Libraries: Install KiCad footprint libraries from GitHub and use them in your tscircuit projects with full TypeScript support.
- Importing from Circuit JSON: You can import Circuit JSON into tscircuit components.
Running tscircuit
- Scripting
- Building a Static Site:
tsci build --sitepackages your tscircuit project into a static website that anyone can browse without running a server. - Connect GitHub Repositories to tscircuit: Link your project repo to tscircuit for automatic previews and publishing
- Displaying Circuit JSON on a Webpage: Render Circuit JSON in web apps using RunFrame and related components
- 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: Use tscircuit libraries and APIs to generate circuits from scripts or services
- 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: Explore current options for running tscircuit outside of a React environment
Circuit Generation
SPICE Simulation
KiCad Integration
- KiCad Metadata: Document KiCad-specific metadata for footprints and symbols on tscircuit components
- Exporting a KiCad Library: Export your tscircuit designs as a KiCad library containing symbols, footprints, and 3D models that can be reused across multiple KiCad projects.
- Using tscircuit KiCad PCM URLs: Install tscircuit component libraries directly into KiCad using the Plugin and Content Manager (PCM) with cloud-hosted repository URLs.
TypeScript Guide
Class D Audio Amplifier HAT
Design a Class D audio amplifier HAT using tscircuit with a PAM8403 stereo amplifier IC. Learn how Class D amplification achieves high efficiency and build a compact speaker driver module perfect for portable audio projects.
Distributing tscircuit Libraries
Publish and distribute tscircuit libraries, including how to make private package builds installable without authorization.
I2C Environmental Sensor Module
Build an I2C environmental sensor module using tscircuit. Connect a BME280 temperature, humidity, and pressure sensor to a Raspberry Pi Pico over I2C, and learn how to read environmental data for weather stations, indoor climate monitoring, and IoT applications.
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: Walk through configuring
<chip />components, from defining pin labels and footprints to wiring reusable chip abstractions. - pcbSx: The pcbSx prop lets you apply PCB-specific style overrides to a component and
- Automatic PCB Layout: Explore tscircuit's automatic PCB layout engines: pcbFlex, pcbGrid, and pcbPack, and learn how to choose the right approach for arranging components quickly.
- Automatic Schematic Layout: Understand how the default schematic autolayout arranges components and discover options for nudging results with manual edits and layout helpers.
- 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/schYandpcbXandpcbY - Manual Edits: Learn how to capture drag-and-drop adjustments in
manual-edits.json, use the schematic and PCB editors to create them, and troubleshoot when changes don't apply. - Panelization: Arrange multiple boards into a manufacturing panel using <panel> and <subpanel> with grid layout, sizing, and tab routing.
- Pinout SVG: Generate shareable pinout diagrams by annotating components with
pinAttributesand exporting the interactive SVG view. - Port and Net Selectors: Learn how to target ports, nets, and components with selector strings, and see practical examples for traces and component props.
- Relative Positioning: Use calc() with pcbX, pcbY, and edge anchor properties to place components relative to other components, pads, and board edges.
- Single Layer Jumper Autorouting: Learn how to route one-layer boards with jumper wires using autorouter="auto_jumper" and layers={1}.
- tscircuit.config.json: Configure your tscircuit project settings
- Using Expressions for Component Values: Use JavaScript expressions inside circuits to derive component values that react to other parameters, like voltage dividers or tuned filters.
- Using Groups for PCB Layout: Groups can help you break up your layout problem into smaller, more manageable and reusable parts.
- Using "sel" References: Reference components, pins, and modules with the type-safe
selhelper and learn when to use conventional selectors or component-aware lookups.
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:
USB Power Delivery Trigger HAT
Learn how to design a USB Power Delivery Trigger HAT using tscircuit. This HAT negotiates higher voltages (9V, 12V, 15V, 20V) from a USB-C PD power source using a CH224K trigger IC, perfect for powering motors, LEDs, or other high-power peripherals.