Skip to main content
Built-in Elements

<netlabel />

Overview​

<netlabel /> places a small label on a schematic net so you can easily identify power rails and other connections. It is especially useful in conjunction with the connections prop of components or modules to show where a net connects.

The preview below uses leftView="code" and rightView="schematic" to show the schematic alongside the example code.

import { sel } from "tscircuit"
export default () => (
<board routingDisabled>
<chip
name="U1"
manufacturerPartNumber="I2C_SENSOR"
footprint="soic4"
pinLabels={{
pin1: "SCL",
pin2: "SDA",
pin3: "VCC",
pin4: "GND",
}}
schPinArrangement={{
leftSide: {
direction: "top-to-bottom",
pins: ["SCL", "SDA", "VCC", "GND"],
},
}}
connections={{
SCL: sel.net.SCL,
SDA: sel.net.SDA,
VCC: sel.net.V3_3,
GND: sel.net.GND,
}}
/>
<netlabel
schX={-2}
schY={-1}
anchorSide="top"
net="GND"
connection="U1.GND"
/>
<netlabel
schX={-2}
schY={0.8}
net="VCC"
connection="U1.VCC"
anchorSide="bottom"
/>
</board>
)
SCHEMATIC Circuit Preview

Properties​

PropertyDescriptionExample
netName of the net that the label represents"VCC"
connectsToOne or more port selectors that the label attaches to"U1.VCC", ["U1.VCC", "U2.VCC"]
connectionSingular port selector that the label attaches to"U1.VCC"
inlinePlaces the net name automatically along its trace, falling back to an anchored label when needed. Positioning props are ignored while active.true
anchorSideWhich side of the connection to place the label. One of "top", "bottom", "left", or "right""top"
schX, schYPosition of the label on the schematic0, -1
schRotationRotation of an anchored label in degrees. Ignored when inline is active.90

Use <netlabel /> to clearly mark nets in your schematic, especially for power rails or when multiple wires join at a single connection point.