Inspect a footprint pad
Example board / Revision C
Selected board object: pad-a. The example supplies each dimension; selecting a pad does not change the board.
Circuit-board pad selection with supplied footprint references, net and layer records, pad types and a dimension table with explicit units.
Example board / Revision C
Selected board object: pad-a. The example supplies each dimension; selecting a pad does not change the board.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { PadInspector } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/pad-inspector.
npx @noorddev/vlak-cli add pad-inspector
The StyleX leaf lands in components/vlak/ with its dependencies, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/pad-inspector.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { PadInspector } from "@noorddev/vlak-react";
<PadInspector label="Connector pads" name="pad" boardLabel="Example board, revision C" defaultValue="pad-a" pads={[
{ id: "pad-a", reference: "J1", number: "1", net: "Supply", layers: ["Front copper", "Back copper"], type: "Through hole", shape: "Circle", geometry: [
{ id: "diameter", label: "Pad diameter", value: "1.80", unit: "mm" },
{ id: "drill", label: "Drill diameter", value: "0.90", unit: "mm" },
] },
{ id: "pad-b", reference: "J1", number: "2", net: "Return", layers: ["Front copper"], type: "Surface mount", shape: "Rectangle" },
]} />Inspects supplied pad records without inferring connectivity, shape or dimensions.
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | ReactNode | ||
padsrequired | readonly PadInspectorPad[] | ||
value | string | null | ||
defaultValue | string | null | null | |
onValueChange | (id: string | null) => void | Requests pad selection only. The host owns board and schematic cross-highlighting. | |
boardLabel | ReactNode | ||
description | ReactNode | ||
selectionLabel | string | "Pad" | |
required | boolean | ||
readOnly | boolean |
Also accepts Omit<FieldsetHTMLAttributes<HTMLFieldSetElement>, "defaultValue">.
| Keys | Does |
|---|---|
| Tab | Focuses the Vlak pad selector. |
| Arrow keys, Home, End | Opens or moves through available pad choices. |
| Enter, Space | Chooses the focused pad. Controlled selection waits for a host update. |
| Escape | Closes the selector and keeps the current choice. |
<fieldset class="rs-pad-inspector"><legend class="rs-pad-inspector-legend">Connector pads</legend><div class="rs-pad-inspector-label"><span id="pad-choice-label">Pad</span><div class="rs-select rs-select-fluid rs-pad-inspector-control"><button type="button" class="rs-dropdown" role="combobox" aria-labelledby="pad-choice-label" aria-expanded="false" aria-haspopup="listbox">J1 / Pad 1 · pad-a</button></div></div><dl class="rs-pad-inspector-properties"><div><dt class="rs-pad-inspector-term">Net</dt><dd class="rs-pad-inspector-detail">Supply</dd></div><div><dt class="rs-pad-inspector-term">Layers</dt><dd class="rs-pad-inspector-detail">Front copper, Back copper</dd></div></dl><table class="rs-pad-inspector-table"><caption class="rs-pad-inspector-caption">Supplied geometry</caption><thead><tr><th class="rs-pad-inspector-cell" scope="col">Dimension</th><th class="rs-pad-inspector-cell" scope="col">Value</th><th class="rs-pad-inspector-cell" scope="col">Unit</th></tr></thead><tbody><tr><th class="rs-pad-inspector-cell" scope="row">Pad diameter</th><td class="rs-pad-inspector-cell">1.80</td><td class="rs-pad-inspector-cell">mm</td></tr></tbody></table></fieldset>