Skip to main content
Built-in Elements

<hole />

Overview

A hole can be used for mounting and doesn't have any conductive properties, for a hole with a conductive ring of copper see <platedhole />.

Holes do not have a schematic representation.

Holes can be used inside of a <footprint /> or as a standalone element.

Hole Shapes

Three hole shapes are supported:

  • circle - A circular hole (default)
  • pill - A pill-shaped hole (rounded rectangle)
  • rect - A rectangular hole

Circle Hole

A circular hole is the most common type used for mounting. Provide either diameter or radius:

export default () => (
<board width="30mm" height="20mm">
<hole radius="1.5mm" pcbX={0} pcbY={0} />
</board>
)
3D Circuit Preview

Pill-Shaped Hole

Pill-shaped holes are useful for mounting components that need elongated holes or for allowing some positional adjustment:

export default () => (
<board width="30mm" height="20mm">
<hole
shape="pill"
width="5mm"
height="2mm"
pcbX={0}
pcbY={0}
/>
</board>
)
PCB Circuit Preview

Rectangular Hole

Rectangular holes are useful when you need a slot with straight edges:

export default () => (
<board width="30mm" height="20mm">
<hole
shape="rect"
width="5mm"
height="2mm"
pcbX={0}
pcbY={0}
/>
</board>
)
PCB Circuit Preview

Rotated Pill Hole

Pill-shaped and rectangular holes can be rotated using the pcbRotation property:

export default () => (
<board width="30mm" height="20mm">
<hole
shape="pill"
width="5mm"
height="2mm"
pcbX={0}
pcbY={0}
pcbRotation="45deg"
solderMaskMargin="0.2mm"
coveredWithSolderMask={false}
/>
</board>
)
PCB Circuit Preview

Properties

PropertyShapeTypeDefaultDescription
shapeall"circle" | "pill" | "rect""circle"Shape of the hole
diametercirclenumber | string-Diameter of the circular hole
radiuscirclenumber | string-Radius of the circular hole
widthpill, rectnumber | string-Width of the pill-shaped or rectangular hole
heightpill, rectnumber | string-Height of the pill-shaped or rectangular hole
solderMaskMarginallnumber | string-Solder mask opening margin around the hole
coveredWithSolderMaskallboolean-Whether the hole should be covered by solder mask
pcbXallnumber0X position of the hole center on the PCB
pcbYallnumber0Y position of the hole center on the PCB
pcbRotationpill, rectnumber | string0Rotation angle in degrees (e.g., "45deg" or 45)