Skip to main content
tscircuit Essentials

Essential Elements

Overview

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!

ElementDescription
<board />The root element of a circuit, defines the size of the board and settings like the autorouting method that should be used
<chip />A packaged integrated circuit (IC). The most versatile and important element — see the comprehensive section below.
<trace />Represents a connection between different chips.
<led />Light emitting diode, a small light often used to represent power or status indicators
<resistor />Resists the flow of electrical current.
<capacitor />Stores electrical charge. Often used to smooth out voltage fluctuations.
<diode />Allows current to flow in one direction.

The Essential Elements

<board />

The <board /> element is the root container for your circuit, similar to how <body /> works in HTML. Every circuit needs a board! You can customize the size using width and height props, or even create custom board outlines for non-rectangular shapes.

export default () => (
<board width="10mm" height="10mm">
<resistor resistance="1k" footprint="0402" name="R1" />
</board>
)
PCB Circuit Preview

<chip />

The <chip /> element is the most versatile and important component in tscircuit — it can represent virtually any packaged electronic component: ICs, connectors, buttons, crystal oscillators, and more. You specify a footprint and pin labels, and tscircuit automatically generates the schematic symbol and PCB footprint.

Why <chip /> is the most important element: Most of the components you'll use in real designs — microcontrollers, sensors, voltage regulators, connectors — are all represented as <chip /> elements. Mastering <chip /> is key to being productive with tscircuit.

export default () => (
<board width="10mm" height="10mm">
<chip
name="U1"
footprint="soic8"
pinLabels={{
pin1: "VCC",
pin2: "DISCH",
pin3: "THRES",
pin4: "CTRL",
pin5: "GND",
pin6: "TRIG",
pin7: "OUT",
pin8: "RESET"
}}
/>
</board>
)
Schematic Circuit Preview

Key chip features:

  • Any footprint: Use any JLCPCB part number or footprint string (soic8, tssop20, qfn32, 0805, etc.)
  • Custom pin arrangements: Control which side pins appear on in the schematic with pinSideMap or schematicPinArrangement
  • Internally connected pins: Use internallyConnectedPins to tell the autorouter which pins are connected inside the chip
  • Pin labels: Set pinLabels for beautiful schematic symbols. Prefix with N_ for active-low pins (e.g. N_RESET renders RESET with a bar)
  • Schematic orientation: Rotate or flip the schematic symbol with schematicRotation and schematicFlip

For a deep dive, see the full <chip /> documentation.

<trace />

Traces are the electrical connections between components. Traces can be created by simply connecting a pin to a net, or you can create a trace that has a specific path through pcbTraceProps.

export default () => (
<board width="12mm" height="10mm">
<chip name="U1" footprint="soic8"
pinLabels={{ pin1: "VCC", pin2: "", pin3: "", pin4: "",
pin5: "GND", pin6: "", pin7: "", pin8: "OUT" }} />
<resistor name="R1" resistance="10k" footprint="0805" pcbX={3} />
<trace from=".U1 > .pin8" to=".R1 > .pin1" />
</board>
)
PCB Circuit Preview

<led />

Light Emitting Diodes (LEDs) are small lights commonly used as power indicators, status displays, or decorative elements. tscircuit supports standard LEDs through the <led /> element.

export default () => (
<board width="10mm" height="10mm">
<led name="LED1" footprint="0805" />
</board>
)
Schematic Circuit Preview

<resistor />

Resistors limit the flow of electrical current. They're one of the most fundamental electronic components, used for current limiting, voltage division, and pull-up/pull-down configurations.

export default () => (
<board width="10mm" height="10mm">
<resistor name="R1" resistance="10k" footprint="0805" />
</board>
)
PCB Circuit Preview

<capacitor />

Capacitors store and release electrical charge. They're commonly used for power supply decoupling, signal filtering, and timing circuits. The <capacitor /> element accepts a capacitance value in farads.

export default () => (
<board width="10mm" height="10mm">
<capacitor name="C1" capacitance="0.1uF" footprint="0805" />
</board>
)
PCB Circuit Preview

<diode />

Diodes allow current to flow in one direction only. They're essential for rectification, reverse polarity protection, and flyback suppression.

export default () => (
<board width="10mm" height="10mm">
<diode name="D1" footprint="sod123" />
</board>
)
Schematic Circuit Preview

All Available Elements

tscircuit ships with a comprehensive library of built-in elements. Here's the complete list organized by category:

Passives

ElementDescription
<resistor />Current-limiting resistor
<capacitor />Charge-storing capacitor
<inductor />Magnetic field inductor
<diode />One-way current flow
<led />Light emitting diode
<fuse />Overcurrent protection
<potentiometer />Variable resistor
<crystal />Quartz crystal oscillator
<resonator />Ceramic resonator
<battery />Battery power source
<pushbutton />Momentary push button
<switch />Toggle switch
<solderjumper />Solder bridge jumper

Semiconductors

ElementDescription
<chip />Most important — any packaged component
<mosfet />MOSFET transistor
<transistor />BJT transistor

Connectivity

ElementDescription
<trace />PCB trace connection
<net />Named electrical net
<netlabel />Net label for schematics
<port />Circuit port/interface
<pinheader />Pin header connector
<connector />Generic connector
<via />PCB via between layers
<jumper />Wire jumper
<testpoint />Test point pad

PCB Features

ElementDescription
<board />Board outline and settings
<hole />Mounting or via hole
<cutout />Board cutout
<copperpour />Copper fill zone
<coppertext />Text rendered in copper
<footprint />Custom PCB footprint
<fiducial />Fiducial marker
<breakout />Breakout tab
<breakoutpoint />Breakout connection point

CAD / 3D

ElementDescription
<cadmodel />STEP/3D model attachment
<cadassembly />Multi-part CAD assembly

Schematic Drawing

ElementDescription
<schematicbox />Schematic rectangle
<schematicline />Schematic line
<schematicpath />Schematic path
<schematictext />Schematic text label
<schematiccircle />Schematic circle
<schematicarc />Schematic arc
<schematicsection />Schematic section divider
<schematictable />Schematic table
<courtyardrect />Courtyard rectangle
<courtyardcircle />Courtyard circle
<courtyardoutline />Courtyard outline

PCB Drawing

ElementDescription
<pcbnoteline />PCB silkscreen line
<pcbnotepath />PCB silkscreen path
<pcbnoterect />PCB silkscreen rectangle
<pcbnotetext />PCB silkscreen text
<pcbnotedimension />PCB dimension marker

Structure & Simulation

ElementDescription
<group />Group elements together
<subcircuit />Reusable subcircuit
<symbol />Custom schematic symbol
<voltageprobe />Voltage measurement point
<voltagesource />Simulation voltage source
<analogsimulation />Analog simulation config
<autoroutingphase />Autorouting phase config