Skip to main content
Built-in Elements

<pcbnoterect />

Overview

The <pcbnoterect /> element draws rectangles on the PCB. It's useful for highlighting specific areas, creating visual boundaries, marking keep-out zones, or organizing sections of your board layout.

Rectangles can be outlined, filled, or both, with customizable colors and stroke styles.

export default () => (
<board width="20mm" height="20mm">
<pcbnoterect
pcbX={0}
pcbY={0}
width={10}
height={6}
strokeWidth={0.3}
color="#ff0000"
/>
</board>
)
PCB Circuit Preview

Basic Examples

Simple Outlined Rectangle

export default () => (
<board width="25mm" height="25mm">
<pcbnoterect
pcbX={0}
pcbY={0}
width={12}
height={8}
strokeWidth={0.4}
color="#0000ff"
/>
</board>
)
PCB Circuit Preview

Filled Rectangle

export default () => (
<board width="25mm" height="25mm">
<pcbnoterect
pcbX={0}
pcbY={0}
width={12}
height={8}
strokeWidth={0.3}
color="#00ff00"
isFilled
/>
</board>
)
PCB Circuit Preview

Dashed Border Rectangle

export default () => (
<board width="30mm" height="25mm">
<pcbnoterect
pcbX={0}
pcbY={0}
width={20}
height={15}
strokeWidth={0.3}
color="#ff00ff"
isStrokeDashed
/>
<pcbnotetext
pcbX={0}
pcbY={0}
text="Keep Out Zone"
fontSize={1.2}
anchorAlignment="center"
/>
</board>
)
PCB Circuit Preview
PropertyTypeRequiredDefaultDescription
pcbXdistanceYes-X coordinate of the rectangle center
pcbYdistanceYes-Y coordinate of the rectangle center
widthdistanceYes-Width of the rectangle in mm
heightdistanceYes-Height of the rectangle in mm
strokeWidthdistanceNo0.1Width of the rectangle border in mm
colorstringNo-Rectangle color as hex string (e.g., "#ff0000")
isFilledbooleanNofalseWhether the rectangle is filled with color
hasStrokebooleanNotrueWhether the rectangle has a border
isStrokeDashedbooleanNofalseWhether the border is drawn with dashes
layerstringNo-PCB layer to place rectangle on