diff --git a/docs/elements/courtyardoutline.mdx b/docs/elements/courtyardoutline.mdx index 5fa2511..4c1d1c3 100644 --- a/docs/elements/courtyardoutline.mdx +++ b/docs/elements/courtyardoutline.mdx @@ -75,3 +75,233 @@ export default () => ( ) `} /> + +## Anchor Alignment + +The `anchorAlignment` prop controls how the courtyard outline is positioned relative to its anchor point. This is useful when you need to align the courtyard with a specific corner or edge of the component. + +### Center (default) + + ( + + + + + + + + + } + /> + +) +`} +/> + +### Top Left + + ( + + + + + + + + + } + /> + +) +`} +/> + +### Top Right + + ( + + + + + + + + + } + /> + +) +`} +/> + +### Bottom Left + + ( + + + + + + + + + } + /> + +) +`} +/> + +### Bottom Right + + ( + + + + + + + + + } + /> + +) +`} +/> + +## Irregular Polygon Courtyard + +For components with non-rectangular outlines (e.g., L-shaped packages), use a multi-point outline to follow the package contour: + + ( + + + + + + + + + } + /> + +) +`} +/> + +## Props + +| Prop | Type | Description | +|------|------|-------------| +| `outline` | `{ x: number, y: number }[]` | Array of points defining the courtyard polygon. Coordinates are relative to the component origin. | +| `anchorAlignment` | `"center" \| "top_left" \| "top_right" \| "bottom_left" \| "bottom_right"` | Controls how the courtyard is positioned relative to its anchor point. Defaults to `"center"`. | + +## Tips + +- Use `anchorAlignment` to offset the courtyard toward a specific corner when placing components near board edges +- For irregular packages (e.g., L-shaped), add more outline points to follow the contour closely +- Courtyard outlines are shown in the PCB view and exported to Gerber files for assembly reference