<connector />
Overview
A <connector /> represents a physical connector on your board, such as a USB receptacle, wire terminal, or board-to-board header. It behaves similarly to <chip /> for placement and footprint handling, but is specialized for connector use cases.
Connectors support:
- Custom pin naming via
pinLabels - Explicit internal shorting via
internallyConnectedPins - Schematic pin styling and arrangement controls
- Optional connector
standardhints for USB-C, M.2, and common JST families
Standard Connector Examples
USB-C
JST connectors
For a JST connector, set standard to the connector family and pinCount to
the number of electrical circuits. When you do not provide a footprint, the
parts engine uses both values to select a compatible part.
The supported JST families are:
standard value | JST family | Nominal pitch |
|---|---|---|
"jst_sh" | SH | 1.0 mm |
"jst_gh" | GH | 1.25 mm |
"jst_zh" | ZH | 1.5 mm |
"jst_ph" | PH | 2.0 mm |
"jst_xh" | XH | 2.5 mm |
"jst_vh" | VH | 3.96 mm |
The family determines the pitch, so use the exact family-only value. For
example, "jst_sh_2mm" is invalid. pinCount must be a positive integer. To
select a specific connector instead of allowing automatic part selection, set
manufacturerPartNumber or provide an explicit footprint; an explicit
footprint takes priority over standard-based selection.
Custom Footprint Example
export default () => (
<board width="40mm" height="40mm">
<connector
name="J1"
manufacturerPartNumber="AF_QTZB1_0"
pinLabels={{
pin1: ["VCC"],
pin2: ["D_NEG"],
pin3: ["D_POS"],
pin4: ["GND"],
pin5: ["EH1"],
pin6: ["EH2"],
}}
footprint={
<footprint>
<hole pcbX="-2.5mm" pcbY="-2.125mm" diameter="1.3mm" />
<hole pcbX="2.5mm" pcbY="-2.125mm" diameter="1.3mm" />
<smtpad
portHints={["pin1"]}
pcbX="-3.5mm"
pcbY="1.575mm"
width="1.1mm"
height="3.8mm"
shape="rect"
/>
<smtpad
portHints={["pin2"]}
pcbX="-1mm"
pcbY="1.575mm"
width="1.1mm"
height="3.8mm"
shape="rect"
/>
<smtpad
portHints={["pin3"]}
pcbX="1mm"
pcbY="1.575mm"
width="1.1mm"
height="3.8mm"
shape="rect"
/>
<smtpad
portHints={["pin4"]}
pcbX="3.5mm"
pcbY="1.575mm"
width="1.1mm"
height="3.8mm"
shape="rect"
/>
<smtpad
portHints={["pin5"]}
pcbX="7.15mm"
pcbY="-1.475mm"
width="1.8mm"
height="4mm"
shape="rect"
/>
<smtpad
portHints={["pin6"]}
pcbX="-7.15mm"
pcbY="-1.475mm"
width="1.8mm"
height="4mm"
shape="rect"
/>
</footprint>
}
/>
</board>
)
This example is adapted from the core test for connector cable insertion center behavior: connector-cable-insertion-center.test.tsx.
Cable insertion center
When a connector footprint is rendered, tscircuit computes pcb_component.cable_insertion_center for the connector in circuit JSON. This gives a useful reference point for cable entry direction, annotation, or automation workflows.
In the linked test, the computed cable insertion center is validated and then visualized as a small PCB note rectangle.
Properties
The TypeScript interface for <connector /> is defined in @tscircuit/props:
export interface ConnectorProps extends CommonComponentProps {
manufacturerPartNumber?: string
pinLabels?: Record<
number | SchematicPinLabel,
SchematicPinLabel | SchematicPinLabel[]
>
schPinStyle?: SchematicPinStyle
schPinSpacing?: number | string
schWidth?: number | string
schHeight?: number | string
schDirection?: "left" | "right"
schPortArrangement?: SchematicPortArrangement
internallyConnectedPins?: (string | number)[][]
standard?:
| "usb_c"
| "m2"
| "jst_sh"
| "jst_gh"
| "jst_zh"
| "jst_ph"
| "jst_xh"
| "jst_vh"
pinCount?: number
}
| Property | Type | Description |
|---|---|---|
manufacturerPartNumber | string | Manufacturer part number for the connector. |
pinLabels | Record<number | SchematicPinLabel, SchematicPinLabel | SchematicPinLabel[]> | Maps connector pins to one or more net labels. |
schPinStyle | SchematicPinStyle | Schematic rendering style for pins. |
schPinSpacing | number | string | Pin spacing in schematic symbol. |
schWidth | number | string | Schematic symbol width. |
schHeight | number | string | Schematic symbol height. |
schDirection | "left" | "right" | Direction of the connector symbol pins. |
schPortArrangement | SchematicPortArrangement | Schematic port layout strategy. |
internallyConnectedPins | (string | number)[][] | Pin groups treated as internally shorted. |
standard | ConnectorStandard | Connector interface or product family. See the supported values above. |
pinCount | number | Number of electrical circuits. Must be a positive integer. |
Like most components, <connector /> also accepts common placement and PCB props from CommonComponentProps such as pcbX, pcbY, rotation, and footprint.