Skip to main content
Built-in Elements

<pcbnotedimension />

Overview

<pcbnotedimension /> lets you add dimensional annotations to your PCB design. These annotations display the distance between two points with arrows and text labels, making it easy to communicate critical measurements for manufacturing, assembly, or design review. Dimension annotations are visible in PCB previews and can be exported with fabrication outputs.

Basic Usage

Below is a simple board with a dimension annotation showing the distance between two components. The dimension line connects two points and displays a label with the measurement.

export default () => (
<board width="20mm" height="15mm">
<resistor name="R1" resistance="10k" footprint="0402" pcbX={-3} pcbY={0} />
<resistor name="R2" resistance="10k" footprint="0402" pcbX={3} pcbY={0} />
<pcbnotedimension
from={{ x: -3, y: 2 }}
to={{ x: 3, y: 2 }}
text="6mm"
arrowSize={0.8}
fontSize={1.5}
color="#ffffff"
/>
</board>
)
PCB Circuit Preview

Using Selectors

Instead of specifying exact coordinates, you can use selectors to reference components. The dimension will automatically point to the component's position.

export default () => (
<board width="25mm" height="15mm">
<resistor name="R1" resistance="10k" footprint="0402" pcbX={-5} pcbY={0} />
<resistor name="R2" resistance="10k" footprint="0402" pcbX={5} pcbY={0} />
<pcbnotedimension
from="R1"
to="R2"
text="10mm spacing"
fontSize={1.2}
color="#00ff00"
/>
</board>
)
PCB Circuit Preview

Properties

PropertyTypeDescription
fromstring | PointRequired. Starting point of the dimension. Can be a selector string (e.g., "R1") or a Point object with x and y coordinates.
tostring | PointRequired. Ending point of the dimension. Can be a selector string (e.g., "R2") or a Point object with x and y coordinates.
textstringLabel text to display on the dimension line (e.g., "5mm", "Critical spacing").
arrowSizelengthSize of the arrows at each end of the dimension line. Defaults to 1mm.
fontSizelengthHeight of the label text. Defaults to 1mm.
colorstringHex color code for the dimension line, arrows, and text (e.g., "#ffffff", "#00ff00").
fontenumFont type for the text. Currently only "tscircuit2024" is supported. Optional.
offsetlengthDistance to offset the dimension line from the direct path between points.
pcbRelativebooleanWhen true, coordinates are relative to the parent group instead of the board origin.
relativebooleanSimilar to pcbRelative, applies to both PCB and schematic coordinates when used inside groups.