ass/f
This code defines a 10mm x 10mm PCB featuring a 1kΩ resistor (R1) and a 1000pF capacitor (C1) connected by a trace.
Usage: To import and use "@tsci/ass.f", add the following code: ```tsx import { SomeComponent } from "@tsci/ass.f" export default () => ( <board width="10mm" height="10mm"> <SomeComponent name="U1" /> <resistor name="R1" resistance="1k" footprint="0402" /> <capacitor name="C1" capacitance="1000pF" footprint="0402" /> <trace from={sel.U1.pin1} to={sel.R1.pin1} /> </board> ) ``` Key points: - Import the component - Add to board using `<SomeComponent>` - Use `name` prop to identify the component - Reference pins with `sel.ComponentName.pinName`
- Version
- 0.0.1
- License
- unset
- Stars
- 0
dist/index.js
PCB
Schematic
var index = () => (React.createElement("board", { width: "10mm", height: "10mm" },
React.createElement("resistor", { resistance: "1k", footprint: "0402", name: "R1" }),
React.createElement("capacitor", { capacitance: "1000pF", footprint: "0402", name: "C1" }),
React.createElement("trace", { from: ".R1 > .pin1", to: ".C1 > .pin1" })));
export { index as default };