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

index.tsx

PCBPCB preview for index.tsx
SchematicSchematic preview for index.tsx
export default () => (
  <board width="10mm" height="10mm">
    <resistor
      resistance="1k"
      footprint="0402"
      name="R1"
    />
    <capacitor
      capacitance="1000pF"
      footprint="0402"
      name="C1"
    />
    <trace from=".R1 > .pin1" to=".C1 > .pin1" />
  </board>
)