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!
| Element | Description | 
|---|---|
| <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). | 
| <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>
)
<chip />
The <chip /> element is the most versatile component in tscircuit - it can represent virtually any packaged electronic component. You specify a footprint and pin labels, and can customize how it appears in both schematic and PCB views. Here's a simple example:
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>
)
You can control pin arrangements, add custom footprints, specify internally connected pins, and more. The <chip /> element is commonly used for ICs, connectors, buttons, and other discrete components.