This subject is covered, with several examples, in:
[How to design PCBs - Appendix A: How to deal with Off-PCB parts.](https://docs.google.com/document/d/1CU7RuPyFlSZPzWBN-YZ0x87xeAB4xpLdLaIsUwhLj_M/edit#heading=h.xxt5yo1ar0j6)<br>
<br>
Chrome
89.0.4389.128
Linux
EasyEDA
6.4.19.5