Skip to main content
Built-in Elements

<pinheader />

Overview​

The <pinheader /> element is used to create a male or female pin header with configurable spacing and number of pins.

Example​

export default () => (
<board width="30mm" height="10mm">
<pinheader
name="J1"
pinCount={8}
gender="male"
pitch="2.54mm"
footprint="pinrow8_rows2"
doubleRow={true}
showSilkscreenPinLabels={true}
pinLabels={["VCC", "GND", "SDA", "SCL", "MISO", "MOSI", "SCK", "CS"]}
pcbX={0}
pcbY={0}
/>
</board>
)
Schematic Circuit Preview

Properties​

PropertyTypeDefaultDescription
pinCountnumber(required)Number of pins in the header
pitchnumber | string"2.54mm"Distance between pins
schFacingDirection"up" | "down" | "left" | "right""right"Direction the header faces in schematic view
gender"male" | "female""male"Whether the header is male or female
connectsFromAbovebooleanundefinedWhen true, mount on the top side so the mating connector approaches from above; an alias for layer="top"
connectsFromBelowbooleanundefinedWhen true, mount on the bottom side so the mating connector approaches from below; an alias for layer="bottom"
showSilkscreenPinLabelsbooleanfalseWhether to show pin labels in silkscreen
doubleRowbooleanfalseWhether the header has two rows of pins
holeDiameternumber | string"1mm"Diameter of the through-hole for each pin
platedDiameternumber | string"1.7mm"Diameter of the plated area around each hole
pinLabelsstring[]undefinedLabels for each pin
facingDirection"left" | "right""right"Direction the header is facing
pcbXnumber0X position of the component
pcbYnumber0Y position of the component
rotationnumber0Rotation of the component in degrees
idstringauto-generatedUnique identifier for the component

An explicit layer takes precedence over either alias. Set at most one of connectsFromAbove and connectsFromBelow to true. Setting both to true is an error, even when layer is explicit. A false alias has no effect: for example, connectsFromAbove={false} does not select the bottom side. With neither alias nor layer, the header uses the top side.

These aliases select the board side, not the direction of the pins through the board. The invert option in a pinrow footprint string reverses the header's installation on its chosen side; it does not select the opposite layer.

Compare top-side and bottom-side headers
export default () => (
<board width="26mm" height="12mm" routingDisabled>
<pinheader
name="J_TOP"
pinCount={3}
pitch="2.54mm"
pcbX={-6}
connectsFromAbove
/>
<pinheader
name="J_BOTTOM"
pinCount={3}
pitch="2.54mm"
pcbX={6}
connectsFromBelow
/>
</board>
)

J_TOP mates from above the board and J_BOTTOM from below. Adding layer="top" to J_BOTTOM would override connectsFromBelow and mount both headers on top. See <board /> for board settings.