Skip to main content
Built-in Elements

<courtyardoutline />

Overview

Use <courtyardoutline /> when your footprint needs a non-rectangular, non-circular courtyard shape.

Basic Outline Example

export default () => (
<board width="30mm" height="24mm">
<chip
name="U1"
footprint={
<footprint>
<platedhole shape="circle" pcbX={-4} pcbY={-2.5} outerDiameter={2.2} holeDiameter={1.1} />
<platedhole shape="circle" pcbX={-4} pcbY={2.5} outerDiameter={2.2} holeDiameter={1.1} />
<platedhole shape="circle" pcbX={4} pcbY={-2.5} outerDiameter={2.2} holeDiameter={1.1} />
<platedhole shape="circle" pcbX={4} pcbY={2.5} outerDiameter={2.2} holeDiameter={1.1} />
<courtyardoutline
outline={[
{ x: -6, y: -5 },
{ x: 6, y: -5 },
{ x: 6, y: 5 },
{ x: 0, y: 7 },
{ x: -6, y: 5 },
]}
/>
</footprint>
}
/>
</board>
)
PCB Circuit Preview

Filled Outline Example

export default () => (
<board width="28mm" height="22mm">
<chip
name="ANT1"
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={-3} outerDiameter={2.2} holeDiameter={1.1} />
<courtyardoutline
outline={[
{ x: -7, y: -5 },
{ x: 7, y: -5 },
{ x: 7, y: 4 },
{ x: 0, y: 7 },
{ x: -7, y: 4 },
]}
/>
</footprint>
}
/>
</board>
)
PCB Circuit Preview

Anchor Alignment Examples

Use anchorAlignment to control which point of the outline's bounding box is placed at the pcbX/pcbY anchor. This is helpful when you want to define an outline using only positive coordinates (e.g. { x: 0, y: 0 } to { x: w, y: h }) but still position it relative to a footprint origin.

export default () => (
<board width="70mm" height="26mm">
<chip
name="CENTER"
pcbX={-20}
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={0} outerDiameter={1.6} holeDiameter={0.8} />
<courtyardoutline
pcbX={0}
pcbY={0}
anchorAlignment="center"
outline={[
{ x: 0, y: 0 },
{ x: 10, y: 0 },
{ x: 10, y: 6 },
{ x: 0, y: 6 },
]}
/>
</footprint>
}
/>

<chip
name="TOP_LEFT"
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={0} outerDiameter={1.6} holeDiameter={0.8} />
<courtyardoutline
pcbX={0}
pcbY={0}
anchorAlignment="top_left"
outline={[
{ x: 0, y: 0 },
{ x: 10, y: 0 },
{ x: 10, y: 6 },
{ x: 0, y: 6 },
]}
/>
</footprint>
}
/>

<chip
name="BOTTOM_RIGHT"
pcbX={20}
footprint={
<footprint>
<platedhole shape="circle" pcbX={0} pcbY={0} outerDiameter={1.6} holeDiameter={0.8} />
<courtyardoutline
pcbX={0}
pcbY={0}
anchorAlignment="bottom_right"
outline={[
{ x: 0, y: 0 },
{ x: 10, y: 0 },
{ x: 10, y: 6 },
{ x: 0, y: 6 },
]}
/>
</footprint>
}
/>
</board>
)
PCB Circuit Preview