npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tscircuit/props

v0.0.705

Published

Props for tscircuit builtin component types

Readme

@tscircuit/props

This repo contains all the prop definitions and zod parsers for tscircuit builtin TSX components, e.g. <resistor />, <diode />, <capacitor /> etc. All tscircuit features typically start with a new props definition.

Contributor Getting Started Video

This repo is the source-of-truth for defining the React props, API changes begin here. The focus of the API is on ergonomics for the user (unlike circuit-json which focuses on ergonomics for a renderer)

import type { ResistorProps, ResistorPropsInput } from "@tscircuit/props";
import { resistorProps } from "@tscircuit/props";

resistorProps.parse({ resistance: "10k" } as ResistorPropsInput);
// { resistance: 10_000 }

Available Components

| Component | Props Interface | | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | | <ammeter /> | AmmeterProps | | <analog.acsweepsimulation /> | AnalogAcSweepSimulationProps | | <analog.dcoperatingpointsimulation /> | AnalogDcOperatingPointSimulationProps | | <analog.dcsweepsimulation /> | AnalogDcSweepSimulationProps | | <analog.digitalstimulus /> | AnalogDigitalStimulusProps | | <analog.eyediagram /> | AnalogEyeDiagramProps | | <analogsimulation /> | AnalogSimulationProps | | <analog.sweepparameter /> | AnalogResistanceSweepParameterProps | | <analog.transientsimulation /> | AnalogTransientSimulationProps | | <antenna /> | AntennaProps | | <autoroutingphase /> | AutoroutingPhaseProps | | <battery /> | BatteryProps | | <board /> | BoardProps | | <breakout /> | BreakoutProps | | <breakoutpoint /> | BreakoutPointProps | | <bus /> | BusProps | | <cadassembly /> | CadAssemblyProps | | <cadmodel /> | CadModelProps | | <capacitor /> | CapacitorProps | | <chip /> | ChipProps | | <connector /> | ConnectorProps | | <constrainedlayout /> | ConstrainedLayoutProps | | <constraint /> | ConstraintProps | | <copperpour /> | CopperPourProps | | <coppertext /> | CopperTextProps | | <courtyardcircle /> | CourtyardCircleProps | | <courtyardoutline /> | CourtyardOutlineProps | | <courtyardpill /> | CourtyardPillProps | | <courtyardrect /> | CourtyardRectProps | | <crystal /> | CrystalProps | | <currentsource /> | CurrentSourceProps | | <cutout /> | RectCutoutProps | | <differentialpair /> | DifferentialPairProps | | <diode /> | DiodeProps | | <drccheck /> | DrcCheckProps | | <fabricationnotedimension /> | FabricationNoteDimensionProps | | <fabricationnotepath /> | FabricationNotePathProps | | <fabricationnoterect /> | FabricationNoteRectProps | | <fabricationnotetext /> | FabricationNoteTextProps | | <fiducial /> | FiducialProps | | <footprint /> | FootprintProps | | <fuse /> | FuseProps | | <group /> | BaseGroupProps | | <hole /> | CircleHoleProps | | <ibismodel /> | IbisModelProps | | <inductor /> | InductorProps | | <interconnect /> | InterconnectProps | | <internalcircuit /> | InternalCircuitProps | | <jumper /> | JumperProps | | <led /> | LedProps | | <mosfet /> | MosfetProps | | <mountedboard /> | MountedBoardProps | | <net /> | NetProps | | <netalias /> | NetAliasProps | | <netlabel /> | NetLabelProps | | <opamp /> | OpAmpProps | | <panel /> | PanelProps | | <pcbbend /> | PcbBendProps | | <pcbkeepout /> | PcbKeepoutProps | | <pcbnotedimension /> | PcbNoteDimensionProps | | <pcbnoteline /> | PcbNoteLineProps | | <pcbnotepath /> | PcbNotePathProps | | <pcbnoterect /> | PcbNoteRectProps | | <pcbnotetext /> | PcbNoteTextProps | | <simulation.pcbreturncurrentexcitation /> | PcbReturnCurrentExcitationProps | | <simulation.pcbreturncurrentsimulation /> | PcbReturnCurrentSimulationProps | | <pcbsoldermaskopening /> | PcbSoldermaskOpeningProps | | <pcbstiffener /> | PcbStiffenerProps | | <pcbtrace /> | PcbTraceProps | | <pinheader /> | PinHeaderProps | | <pinout /> | PinoutProps | | <platedhole /> | CirclePlatedHoleProps | | <port /> | PortProps | | <potentiometer /> | PotentiometerProps | | <powersource /> | PowerSourceProps | | <pushbutton /> | PushButtonProps | | <resistor /> | ResistorProps | | <resonator /> | ResonatorProps | | <schematicarc /> | SchematicArcProps | | <schematicbox /> | SchematicBoxProps | | <schematiccell /> | SchematicCellProps | | <schematiccircle /> | SchematicCircleProps | | <schematicgraphic /> | SchematicGraphicProps | | <schematicline /> | SchematicLineProps | | <schematicpath /> | SchematicPathProps | | <schematicrect /> | SchematicRectProps | | <schematicrow /> | SchematicRowProps | | <schematicsection /> | SchematicSectionProps | | <schematicsheet /> | SchematicSheetProps | | <schematicsymbol /> | SchematicSymbolProps | | <schematictable /> | SchematicTableProps | | <schematictext /> | SchematicTextProps | | <silkscreencircle /> | SilkscreenCircleProps | | <silkscreengraphic /> | SilkscreenGraphicProps | | <silkscreenline /> | SilkscreenLineProps | | <silkscreenpath /> | SilkscreenPathProps | | <silkscreenrect /> | SilkscreenRectProps | | <silkscreentext /> | SilkscreenTextProps | | <smtpad /> | RectSmtPadProps | | <solderjumper /> | SolderJumperProps | | <solderpaste /> | RectSolderPasteProps | | <spicemodel /> | SpiceModelProps | | <stampboard /> | StampboardProps | | <subcircuit /> | SubcircuitProps | | <subpanel /> | SubpanelProps | | <switch /> | SwitchProps | | <symbol /> | SymbolProps | | <testpoint /> | TestpointProps | | <toolingrail /> | ToolingrailProps | | <trace /> | TraceProps | | <tracehint /> | TraceHintProps | | <transistor /> | TransistorProps | | <via /> | ViaProps | | <voltageprobe /> | VoltageProbeProps | | <voltagesource /> | VoltageSourceProps |

Usage Examples

import { resistorProps, type ResistorProps } from "@tscircuit/props";

// Validate component props
const validatedProps = resistorProps.parse({ resistance: "10k" });
// { resistance: 10000 }

// Type safety
const myResistor: ResistorProps = {
  name: "R1",
  resistance: 10000,
  footprint: "0805",
};

Component Interface Definitions

Below are the TypeScript interface definitions for all component props:

CommonComponentProps

export interface CommonComponentProps extends CommonLayoutProps {
  key?: any;
  name: string;
  pinAttributes?: Record<PinLabel, PinAttributeMap>;
  supplierPartNumbers?: SupplierPartNumbers;
  cadModel?: CadModelProp;
  children?: any;
  symbolName?: string;
  doNotPlace?: boolean;
  /**
   * This component will be drawn as part of this section e.g. "Power"
   */
  schSectionName?: string;
  /**
   * This component will be drawn as part of this sheet e.g. "Main"
   */
  schSheetName?: string;
}

Source

SubcircuitGroupProps

export interface SubcircuitGroupProps extends BaseGroupProps {
  manualEdits?: ManualEditsFileInput;
  routingDisabled?: boolean;
  defaultTraceWidth?: Distance;
  minTraceWidth?: Distance;
  nominalTraceWidth?: Distance;
  pcbRouteCache?: PcbRouteCache;

  autorouter?: AutorouterProp;
  preflightRoutingCheckPolicy?: PreflightRoutingCheckPolicy;
  exposedNets?: string[];
  exposeNets?: boolean;

  /**
   * If true, we'll automatically layout the schematic for this group. Must be
   * a subcircuit (currently). This is eventually going to be replaced with more
   * sophisticated layout options/modes and will be enabled by default.
   */
  schAutoLayoutEnabled?: boolean;

  /**
   * If true, net labels will automatically be created for complex traces
   */
  schTraceAutoLabelEnabled?: boolean;

  /** Maximum length a trace can span on the schematic */
  schMaxTraceDistance?: Distance;

  partsEngine?: PartsEngine;
}

Source

AmmeterProps <ammeter />

export interface AmmeterProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  connections: Connections<AmmeterPinLabels>;
  color?: string;
  graphDisplayName?: string;
  graphCenter?: number;
  graphVerticalOffset?: number | string;
  graphCurrentPerDiv?: number | string;
}

Source

AnalogAcSweepSimulationProps <analog.acsweepsimulation />

export interface AnalogAcSweepSimulationProps extends AnalogAnalysisSimulationBaseProps {
  /** Frequency spacing used by the AC analysis. */
  sweepType: "linear" | "decade" | "octave";
  /** First positive frequency. Raw numbers are hertz. */
  startFrequency: number | string;
  /** Last frequency, which must be greater than startFrequency. Raw numbers are hertz. */
  stopFrequency: number | string;
  /** Samples per decade or octave; required for non-linear sweeps. */
  samplesPerInterval?: number;
  /** Total samples; required for linear sweeps. */
  sampleCount?: number;
}

Source

AnalogDcOperatingPointSimulationProps <analog.dcoperatingpointsimulation />

export type AnalogDcOperatingPointSimulationProps =
  AnalogAnalysisSimulationBaseProps;

Source

AnalogDcSweepSimulationProps <analog.dcsweepsimulation />

export interface AnalogDcSweepSimulationProps extends AnalogAnalysisSimulationBaseProps {
  /** Selector for the independent voltage or current source being swept. */
  sweepSource: string;
  /** First source level. Raw numbers use volts or amperes according to the source. */
  sweepStart: number | string;
  /** Last source level. Raw numbers use volts or amperes according to the source. */
  sweepStop: number | string;
  /** Nonzero increment directed from sweepStart toward sweepStop. */
  sweepStep: number | string;
}

Source

AnalogDigitalStimulusProps <analog.digitalstimulus />

export interface AnalogDigitalStimulusProps {
  name: string;
  /** Selector for the external analog.transientsimulation experiment. */
  simulationRef: string;
  /** Selector for the physical source pin driven by this stimulus. */
  sourcePinRef: string;
  bitDuration: number | string;
  startTime: number | string;
  /** Initial bit before optional inversion. No traffic defaults are inferred. */
  initialState: 0 | 1;
  inverted?: boolean;
  transmittedData: {
    transmissionType: "bits";
    bits: string | [0 | 1, ...(0 | 1)[]];
    repeat: boolean;
  };
}

Source

AnalogEyeDiagramProps <analog.eyediagram />

export interface AnalogEyeDiagramProps {
  name: string;
  simulationRef: string;
  probeRef: string;
  unitInterval: number | string;
  timeOrigin: number | string;
  /** Omitted gate endpoints use the experiment's recorded start/end times. */
  startTime?: number | string;
  endTime?: number | string;
}

Source

AnalogSimulationProps <analogsimulation />

export interface AnalogSimulationProps {
  name?: string;
  simulationType?: "spice_transient_analysis";
  duration?: number | string;
  startTime?: number | string;
  timePerStep?: number | string;
  spiceEngine?: AutocompleteString<"spicey" | "ngspice" | "pcb_spice">;
  spiceOptions?: SpiceOptions;
  graphIndependentAxes?: boolean;
}

Source

AnalogResistanceSweepParameterProps <analog.sweepparameter />

export interface AnalogResistanceSweepParameterProps extends AnalogSweepCoordinatesProps {
  parameterType: "resistance";
  /** Selector for the resistor whose simulation-only resistance is swept. */
  resistorRef: string;
}

Source

AnalogTransientSimulationProps <analog.transientsimulation />

export interface AnalogTransientSimulationProps extends AnalogAnalysisSimulationBaseProps {
  /** Simulation duration. Raw numbers are milliseconds. Defaults to 10ms. */
  duration?: number | string;
  /** Time at which recording starts. Raw numbers are milliseconds. Defaults to 0ms. */
  startTime?: number | string;
  /** Maximum simulation timestep. Raw numbers are milliseconds. Defaults to 0.01ms. */
  timePerStep?: number | string;
  /** Physical pin selectors and per-experiment direction/enable states. Requires spiceEngine="pcb_spice"; rendering only declares the experiment. */
  ibisPinStates?: Record<string, IbisPinRunState>;
}

Source

AntennaProps <antenna />

export interface AntennaProps extends CommonComponentProps {
  /**
   * Band-qualified PCB-trace topology to generate. The encoded band is enough
   * to select the geometry without frequencyBand. No shape is assumed when
   * omitted. An explicit pcbPath takes precedence when both are provided.
   */
  antennaShape?: AntennaShape;
  /**
   * Nominal operating band or multiband configuration. This is redundant when
   * antennaShape is present; the band encoded in antennaShape controls generated
   * geometry.
   */
  frequencyBand?: AntennaFrequencyBand;
  /**
   * Explicit antenna path. Entries use the same selector, point, and via
   * syntax as trace pcbPath entries.
   */
  pcbPath?: PcbPath;
}

Source

AutoroutingPhaseProps <autoroutingphase />

export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
  key?: any;
  name?: string;
  autorouter?: AutorouterProp;
  /**
   * Custom async routing function accepting simple route JSON and returning the
   * routing result, using the same contract as autorouter.algorithmFn. Parsing
   * preserves the function unchanged. Omitted by default; no aliases or prop
   * conflicts are introduced, and existing phases require no migration.
   */
  algorithmFn?: AutorouterConfig["algorithmFn"];
  preflightRoutingCheckPolicy?: PreflightRoutingCheckPolicy;
  phaseIndex?: number;
  /**
   * Saved PCB wire/via routes using the same format as fanout pcbTracePaths.
   * Numeric distances are mm; unit strings are normalized to mm. Omitted by
   * default; an empty array is accepted. No aliases or prop conflicts are
   * introduced, and existing phases require no migration.
   */
  pcbTracePaths?: FanoutTracePath[];
  region?: {
    shape?: "rect";
    minX: number;
    maxX: number;
    minY: number;
    maxY: number;
  };
  connection?: string;
  connections?: string[];
  // Reroutes traces selected by region or connection. The simplify autorouter
  // may omit a selector to simplify every existing trace in the phase.
  reroute?: boolean;
}

Source

BatteryProps <battery />

export interface BatteryProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  capacity?: number | string;
  voltage?: number | string;
  standard?: "AA" | "AAA" | "9V" | "CR2032" | "18650" | "C";
  schOrientation?: SchematicOrientation;
  connections?: Connections<BatteryPinLabels>;
}

Source

BoardProps <board />

export interface BoardProps extends Omit<
  SubcircuitGroupProps,
  "subcircuit" | "connections" | "outline"
> {
  title?: string;
  /** e.g. "NEMA17.backface". */
  mountedTo?: string;
  /** Clearance from the mounting face, e.g. "6mm". */
  mountGap?: Distance;
  /** e.g. "J_USB" or "rightedge". */
  mountRotationAnchor?: BoardMountRotationAnchor;
  /** e.g. "calc(NEMA17.wireside-90degcw)". */
  mountRotation?: string;
  /** e.g. "top_layer_toward_mount_face". */
  mountOrientation?: BoardMountOrientation;
  /** Fabricator preset, preserved as supplied. Omitted leaves the preset unset. */
  fabricatorPreset?:
    | "jlcpcb_economy"
    | "jlcpcb_standard"
    | "jlcpcb_economy_20260912"
    | "jlcpcb_standard_20260912";
  material?: "fr4" | "fr1" | "flex";
  /** Number of layers for the PCB */
  layers?: 1 | 2 | 4 | 6 | 8 | 10;
  /**
   * Whether the autorouter may generate blind and buried vias. Defaults to
   * false, which restricts newly generated vias to the full board stack.
   */
  allowBlindAndBuriedVias?: boolean;
  /**
   * Whether to route remaining unrouted connections after explicit routing phases.
   * Omitted leaves the setting unset, preserving the consumer's default behavior.
   */
  routeRemaining?: boolean;
  defaultViaTenting?:
    | boolean
    | "both_sides"
    | "top_and_bottom_tented"
    | "top_tented"
    | "bottom_tented"
    | "exposed";
  borderRadius?: Distance;
  thickness?: Distance;
  boardAnchorPosition?: Point;
  anchorAlignment?: z.infer<typeof ninePointAnchor>;
  boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
  /**
   * Points defining the board edge. Set `isCastellatedHole` on a point to
   * place a castellated plated hole centered on that location.
   *
   * @example
   * ```tsx
   * { x: "-5mm", y: 0, isCastellatedHole: true,
   *   holeDiameter: "0.8mm", padDiameter: "1.2mm",
   *   connectsTo: "net.GND" }
   * ```
   */
  outline?: BoardOutlinePoint[];
  /** Color applied to both top and bottom solder masks */
  solderMaskColor?: BoardColor;
  /** Color of the top solder mask */
  topSolderMaskColor?: BoardColor;
  /** Color of the bottom solder mask */
  bottomSolderMaskColor?: BoardColor;
  /** Color applied to both top and bottom silkscreens */
  silkscreenColor?: BoardColor;
  /** Color of the top silkscreen */
  topSilkscreenColor?: BoardColor;
  /** Color of the bottom silkscreen */
  bottomSilkscreenColor?: BoardColor;
  /** Whether the board should be assembled on both sides */
  doubleSidedAssembly?: boolean;
  /** Whether vias may be placed inside PCB pads */
  isViaInPadAllowed?: boolean;
  /**
   * Whether implicit copper pours should be generated automatically. Defaults
   * to false.
   */
  automaticPoursEnabled?: boolean;
  /** Whether to stitch copper pours on the same net across layers with vias. Defaults to false. */
  enableViaStitching?: boolean;
  /** Positive center-to-center stitching via spacing in millimeters or a unit string. Omitted uses the solver default. Does not enable stitching by itself. */
  viaStitchPitch?: Distance;
  /** Whether this board should be omitted from the schematic view */
  schematicDisabled?: boolean;
}

Source

BreakoutProps <breakout />

export interface BreakoutProps
  extends Omit<SubcircuitGroupProps, "subcircuit">, FanoutProps {
  /**
   * Autorouter used to escape the components inside the breakout boundary.
   * Defaults to the multilayer fanout autorouter.
   * `"dogbone"` selects local pad-to-via escapes without boundary routing.
   * Accepted as a preset string or `{ preset: "dogbone" }`; parsing preserves
   * the selected form. This adds an explicit preset with no aliases or changes
   * to the default. Routing requires a core version supporting this preset.
   */
  autorouter?: AutorouterProp;
  /**
   * Saved port-to-exit wire/via routes in the fanout's local PCB frame.
   * Numeric distances are mm; unit strings are normalized to mm. Each route
   * must start at its selected port and end at its fanout exit. Layers name
   * physical board layers. Either endpoint may be a via when permitted by
   * the circuit's routing rules (e.g. allowViaInPad for a via at a pad).
   * Core creates the exits and preserves saved copper.
   * When supplied, replaces automatic routing (including `autorouter`) for
   * this fanout and must cover all its routing connections. Do not also add
   * a breakoutpoint/fanoutpoint for the same port. Omitted by default; existing
   * automatic fanouts are unchanged. No aliases or migration are required.
   */
  pcbTracePaths?: FanoutTracePath[];
  padding?: Distance;
  paddingLeft?: Distance;
  paddingRight?: Distance;
  paddingTop?: Distance;
  paddingBottom?: Distance;
  /**
   * Minimum clearance between this fanout boundary and another fanout
   * boundary. Fanout boundaries may never overlap, even when this is omitted.
   */
  fanoutMargin?: Distance;
}

Source

BreakoutPointProps <breakoutpoint />

export interface BreakoutPointProps extends Omit<
  PcbLayoutProps,
  "pcbRotation" | "layer"
> {
  connection: string;
}

Source

BusProps <bus />

export interface BusProps {
  name?: string;
  /** Match these trace/port/bus/pair selectors as well as this element's members.
   * maxLengthSkew applies to the combined members; no tolerance is inferred. */
  lengthMatchTo?: string | string[];
  /** Minimum/maximum pad-to-pad planar length for each member. Raw numbers are mm. */
  minLength?: RouteLength;
  maxLength?: RouteLength;
  /** Nominal member length, absolute or relative to selected endpoints.
   * Requires an explicit lengthTolerance, including zero for exact matching. */
  targetLength?: RouteLength;
  /** Allowed deviation above/below targetLength, in mm. */
  lengthTolerance?: number | string;
  /** Minimum centreline spacing between bus members, excluding declared pair partners.
   * Raw numbers are mm; "3w" means three times the larger local trace width. */
  pcbTraceSpacing?: TraceSpacing;
  /** Minimum centreline spacing to traces outside this bus/pair (mm or e.g. "4w"). */
  pcbSpacingToOtherSignals?: TraceSpacing;

  /** One or more trace names or port selectors for the connections in the bus. */
  connections: string[];
  /** If set, every trace in this bus is assigned to this autorouting phase. */
  routingPhaseIndex?: number | null;
  /** Maximum routed-length difference between bus members. Raw numbers are millimeters. */
  maxLengthSkew?: number | string;
  /** Intended single-ended impedance, e.g. "50±25ohm". Raw numbers are ohms. */
  targetImpedance?: ImpedanceTarget;
  /** Inclusive minimum/maximum acceptable impedance, in ohms. May be used without a nominal target. */
  targetImpedanceMin?: number | string;
  targetImpedanceMax?: number | string;
  /** Explicit PCB trace width for every bus member. Raw numbers are millimeters. */
  pcbTraceWidth?: number | string;
  /** PCB layers on which the bus may be routed. */
  pcbAllowedLayers?: LayerRefInput[];
  /** Preferred PCB layer for routing the bus. */
  preferredLayer?: LayerRefInput;
  /** Preferred PCB layers for routing the bus, in priority order. */
  preferredLayers?: LayerRefInput[];
}

Source

CadAssemblyProps <cadassembly />

export interface CadAssemblyProps {
  /**
   * The layer that the CAD assembly is designed for. If you set this to "top"
   * then it means the children were intended to represent the top layer. If
   * the <chip /> with this assembly is moved to the bottom layer, then the
   * components will be mirrored.
   *
   * Generally, you shouldn't set this except where it can help prevent
   * confusion because you have a complex multi-layer assembly. Default is
   * "top" and this is most intuitive.
   */
  originalLayer?: LayerRef;

  children?: any;
}

Source

CadModelProps <cadmodel />

export interface CadModelProps extends CadModelBase {
  /** Canonical model URL after parsing; authored model strings resolve to this field. */
  modelUrl: string;
  stepUrl?: string;
  pcbX?: Distance;
  pcbY?: Distance;
  pcbLeftEdgeX?: Distance;
  pcbRightEdgeX?: Distance;
  pcbTopEdgeY?: Distance;
  pcbBottomEdgeY?: Distance;
  pcbOffsetX?: Distance;
  pcbOffsetY?: Distance;
  pcbZ?: Distance;
}

Source

CapacitorProps <capacitor />

export interface CapacitorProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  capacitance: number | string;
  maxVoltageRating?: number | string;
  schShowRatings?: boolean;
  polarized?: boolean;
  decouplingFor?: string;
  decouplingTo?: string;
  bypassFor?: string;
  bypassTo?: string;
  /** Maximum allowed PCB trace length between this capacitor and the component it decouples */
  maxDecouplingTraceLength?: number | string;
  schOrientation?: SchematicOrientation;
  schSize?: SchematicSymbolSize;
  connections?: Connections<CapacitorPinLabels>;
}

Source

ChipProps <chip />

export interface ChipPropsSU<
  PinLabel extends SchematicPinLabel = SchematicPinLabel,
> extends CommonComponentProps<PinLabel> {
  manufacturerPartNumber?: string;
  pinLabels?: PinLabelsProp<SchematicPinLabel, PinLabel>;
  /**
   * Whether to show pin aliases in the schematic
   */
  showPinAliases?: boolean;
  /**
   * Labels for PCB pins
   */
  pcbPinLabels?: Record<string, string>;
  schPinArrangement?: SchematicPortArrangement;
  /** @deprecated Use schPinArrangement instead. */
  schPortArrangement?: SchematicPortArrangement;
  pinCompatibleVariants?: PinCompatibleVariant[];
  schPinStyle?: SchematicPinStyle;
  /** @deprecated Use schPinStyle instead. */
  schPinSpacing?: Distance;
  schWidth?: Distance;
  schHeight?: Distance;
  noSchematicRepresentation?: boolean;
  /**
   * Whether to show the components from `internalCircuit` in the schematic.
   * When false, the chip's schematic box is shown instead.
   * @default false
   */
  schShowInternalCircuit?: boolean;
  internallyConnectedPins?: (string | number)[][];
  externallyConnectedPins?: string[][];
  /**
   * Pins intentionally left unconnected. This is a shorthand for marking
   * those pins as do-not-connect without repeating pinAttributes entries.
   */
  noConnect?: readonly PinLabel[] | PinLabel[];
  connections?: Connections<PinLabel>;
  spiceModel?: SpiceModelElement;
  /**
   * Functional components contained inside this physical chip package,
   * wrapped in an `<internalcircuit />` element.
   */
  internalCircuit?: InternalCircuitElement;
}

Source

ConnectorProps <connector />

export interface ConnectorProps extends ChipPropsSU {
  /**
   * Connector interface or product family, e.g. usb_c, m2, jst_ph
   */
  standard?: ConnectorStandard;

  /**
   * Number of electrical circuits in the connector
   */
  pinCount?: number;
}

Source

ConstrainedLayoutProps <constrainedlayout />

export interface ConstrainedLayoutProps {
  name?: string;
  pcbOnly?: boolean;
  schOnly?: boolean;
}

Source

ConstraintProps <constraint />

export type ConstraintProps =
  | PcbXDistConstraint
  | PcbYDistConstraint
  | PcbSameYConstraint
  | PcbSameXConstraint;

// -----------------------------------------------------------------------------
// Zod
// -----------------------------------------------------------------------------

Source

CopperPourProps <copperpour />

export interface CopperPourProps {
  name?: string;
  layer: LayerRefInput;
  connectsTo: string;
  /**
   * Fill with a 45-degree crosshatch (defaults: 0.25mm copper width, 1mm pitch).
   * Preserves solid copper around boundaries and connections. Defaults to false.
   */
  crosshatch?: boolean;
  /** Repeat spacing perpendicular to the hatch strips. Defaults to 1mm when crosshatch is enabled. */
  crosshatchPitch?: Distance;
  /** Copper strip width, also used for the solid rim. Defaults to 0.25mm; must be less than the pitch when crosshatch is enabled. */
  crosshatchWidth?: Distance;
  /**
   * Reserves the pour region during autorouting so unrelated traces do not
   * split it. Vias may still cross the region using antipads.
   */
  unbroken?: boolean;
  padMargin?: Distance;
  traceMargin?: Distance;
  clearance?: Distance;
  boardEdgeMargin?: Distance;
  cutoutMargin?: Distance;
  useThermalReliefs?: boolean;
  outline?: Point[];
  coveredWithSolderMask?: boolean;
}

Source

CopperTextProps <coppertext />

export type CopperTextProps = z.input<typeof copperTextProps>;

Source

CourtyardCircleProps <courtyardcircle />

export type CourtyardCircleProps = z.input<typeof courtyardCircleProps>;

Source

CourtyardOutlineProps <courtyardoutline />

export type CourtyardOutlineProps = z.input<typeof courtyardOutlineProps>;

Source

CourtyardPillProps <courtyardpill />

export type CourtyardPillProps = z.input<typeof courtyardPillProps>;

Source

CourtyardRectProps <courtyardrect />

export type CourtyardRectProps = z.input<typeof courtyardRectProps>;

Source

CrystalProps <crystal />

export interface CrystalProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  frequency: number | string;
  loadCapacitance: number | string;
  /** Maximum allowed PCB trace length between the crystal and its connected component */
  maxTraceLength?: number | string;
  manufacturerPartNumber?: string;
  pinVariant?: PinVariant;
  schOrientation?: SchematicOrientation;
  connections?: Connections<CrystalPinLabels>;
}

Source

CurrentSourceProps <currentsource />

export interface CurrentSourceProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  current?: number | string;
  frequency?: number | string;
  peakToPeakCurrent?: number | string;
  waveShape?: WaveShape;
  phase?: number | string;
  dutyCycle?: number | string;
  /** Small-signal AC magnitude. Raw numbers are amperes. */
  acMagnitude?: number | string;
  /** Small-signal AC phase. Raw numbers are degrees. */
  acPhase?: number | string;
  connections?: Connections<CurrentSourcePinLabels>;
}

Source

RectCutoutProps <cutout />

export interface RectCutoutProps extends Omit<
  PcbLayoutProps,
  "layer" | "pcbRotation"
> {
  name?: string;
  shape: "rect";
  width: Distance;
  height: Distance;
}

Source

DifferentialPairProps <differentialpair />

export interface DifferentialPairProps {
  name?: string;
  /** Match these trace/port/bus/pair selectors as well as this element's members.
   * maxLengthSkew applies to the combined members; no tolerance is inferred. */
  lengthMatchTo?: string | string[];
  /** Minimum/maximum pad-to-pad planar length for each member. Raw numbers are mm. */
  minLength?: RouteLength;
  maxLength?: RouteLength;
  /** Nominal member length, absolute or relative to selected endpoints.
   * Requires an explicit lengthTolerance, including zero for exact matching. */
  targetLength?: RouteLength;
  /** Allowed deviation above/below targetLength, in mm. */
  lengthTolerance?: number | string;
  /** Minimum centreline spacing to traces outside this bus/pair (mm or e.g. "4w"). */
  pcbSpacingToOtherSignals?: TraceSpacing;

  /** Name of the trace or pin carrying the positive signal. */
  positiveConnection: string;
  /** Name of the trace or pin carrying the negative signal. */
  negativeConnection: string;
  /** Maximum permitted routed-length skew. Raw numbers are millimeters. */
  maxLengthSkew?: number | string;
  /** Intended differential impedance, e.g. "100±10ohm". Raw numbers are ohms. */
  targetDifferentialImpedance?: ImpedanceTarget;
  /** Inclusive minimum/maximum acceptable impedance, in ohms. May be used without a nominal target. */
  targetDifferentialImpedanceMin?: number | string;
  targetDifferentialImpedanceMax?: number | string;
  /** Edge-to-edge PCB copper gap between the pair. Raw numbers are millimeters. */
  pcbTraceGap?: number | string;
  /** Maximum length over which the pair may be routed without coupling. Raw numbers are millimeters. */
  maxUncoupledLength?: number | string;
}

Source

DiodeProps <diode />

export interface DiodeProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  pinLabels?: DiodePinLabelsProp<PinLabel>;
  connections?: {
    anode?: string | string[] | readonly string[];
    cathode?: string | string[] | readonly string[];
    pin1?: string | string[] | readonly string[];
    pin2?: string | string[] | readonly string[];
    pos?: string | string[] | readonly string[];
    neg?: string | string[] | readonly string[];
  };
  variant?: "standard" | "schottky" | "zener" | "avalanche" | "photo" | "tvs";
  standard?: boolean;
  schottky?: boolean;
  zener?: boolean;
  avalanche?: boolean;
  photo?: boolean;
  tvs?: boolean;
  schOrientation?: SchematicOrientation;
  /** Select a compact schematic symbol; omitted, default, and md retain the standard symbol. */
  schSize?: SchematicSymbolSize;
}

Source

DrcCheckProps <drccheck />

export interface DrcCheckProps {
  name?: string;
  checkFn: CustomDrcCheckFn;
}

Source

FabricationNoteDimensionProps <fabricationnotedimension />

export interface FabricationNoteDimensionProps extends Omit<
  PcbLayoutProps,
  | "pcbLeftEdgeX"
  | "pcbRightEdgeX"
  | "pcbTopEdgeY"
  | "pcbBottomEdgeY"
  | "pcbX"
  | "pcbY"
  | "pcbOffsetX"
  | "pcbOffsetY"
  | "pcbRotation"
> {
  from: string | Point;
  to: string | Point;
  text?: string;
  /** Offset distance in mm, or a unit-bearing string. Defaults to no offset. */
  offset?: string | number;
  /**
   * Unitless direction in footprint-local coordinates (+X right, +Y up).
   * Preserved as supplied; omitted uses the perpendicular to from -> to.
   * The direction rotates/mirrors with the footprint, without translation.
   */
  offsetDirection?: { x: number; y: number };
  font?: "tscircuit2024";
  fontSize?: string | number;
  color?: string;
  arrowSize?: string | number;
  units?: "in" | "mm";
  outerEdgeToEdge?: true;
  centerToCenter?: true;
  innerEdgeToEdge?: true;
}

Source

FabricationNotePathProps <fabricationnotepath />

export type FabricationNotePathProps = z.input<typeof fabricationNotePathProps>;

Source

FabricationNoteRectProps <fabricationnoterect />

export type FabricationNoteRectProps = z.input<typeof fabricationNoteRectProps>;

Source

FabricationNoteTextProps <fabricationnotetext />

export interface FabricationNoteTextProps extends PcbLayoutProps {
  text: string;
  anchorAlignment?:
    "center" | "top_left" | "top_right" | "bottom_left" | "bottom_right";
  font?: "tscircuit2024";
  fontSize?: string | number;
  color?: string;
}

Source

FiducialProps <fiducial />

export interface FiducialProps extends CommonComponentProps {
  soldermaskPullback?: Distance;
  padDiameter: Distance;
}

Source

FootprintProps <footprint />

export interface FootprintProps {
  children?: any;
  name?: string;
  /**
   * The layer that the footprint is designed for. If you set this to "top"
   * then it means the children were intended to represent the top layer. If
   * the <chip /> with this footprint is moved to the bottom layer, then the
   * components will be mirrored.
   *
   * Generally, you shouldn't set this except where it can help prevent
   * confusion because you have a complex multi-layer footprint. Default is
   * "top" and this is most intuitive.
   */
  originalLayer?: LayerRef;
  /**
   * Serialized circuit JSON describing a precompiled footprint
   */
  circuitJson?: any[];
  /**
   * Can be a footprint or kicad string
   */
  src?: FootprintProp;
  /**
   * Direction a cable or mating part is attached from, in the footprint's own
   * frame -- the same frame its pads are drawn in. Directions are named for the
   * footprint as drawn in the 2D PCB view: `from_top` is +Y, `from_bottom` -Y,
   * `from_left` -X, `from_right` +X, `from_above` +Z and `from_below` -Z.
   * Cartesian spellings such as `from_y_pos` are also accepted.
   *
   * This names a side, not a motion. A receptacle on the +Y edge is `from_top`
   * because that is the side the plug comes from, even though the plug itself
   * moves in -Y as it seats.
   *
   * This is a property of the part, so it is authored without regard to where
   * the part is placed. Rotating or flipping the component rotates this with it,
   * and `pcb_component.insertion_direction` reports the result in board
   * coordinates. The two frames coincide for an unrotated top-layer part, which
   * makes the distinction easy to miss.
   */
  insertionDirection?: FootprintInsertionDirection;
  /**
   * Direction the part's enclosure opening faces, named the same way as
   * `insertionDirection` and in the same unrotated part frame.
   *
   * These are two different physical facts and a part may need both. A
   * side-actuated switch is *installed* from above and *actuated* from the side:
   * its aperture must pierce a side wall, while nothing is ever inserted into
   * it. Reusing `insertionDirection` for that would either put the opening on
   * the wrong face or overload a field documented as "the side exposing the
   * receptacle where the cable is attached".
   *
   * Like `insertionDirection`, this is a property of the part, authored without
   * regard to placement: rotating or flipping the component rotates it too, and
   * `pcb_component.cutout_aperture_direction` reports the result in board
   * coordinates.
   *
   * When absent, the aperture falls back to `insertionDirection`, which is
   * correct for every connector -- a cable enters through the opening it needs.
   */
  cutoutApertureDirection?: FootprintInsertionDirection;
}

Source

FuseProps <fuse />

export interface FuseProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  /**
   * Current rating of the fuse in amperes
   */
  currentRating: number | string;

  /**
   * Voltage rating of the fuse
   */
  voltageRating?: number | string;

  /**
   * Whether to show ratings on schematic
   */
  schShowRatings?: boolean;

  schOrientation?: SchematicOrientation;

  /**
   * Connections to other components
   */
  connections?: Connections<PinLabel>;
}

Source

BaseGroupProps

export interface BaseGroupProps extends CommonLayoutProps, LayoutConfig {
  name?: string;
  key?: any;
  children?: any;

  pcbStyle?: PcbStyle;

  /**
   * Title to display above this group in the schematic view
   */
  schTitle?: string;

  /**
   * This group will be drawn as part of this sheet e.g. "Main"
   */
  schSheetName?: string;

  /**
   * If true, render this group as a single schematic box
   */
  showAsSchematicBox?: boolean;

  /**
   * Mapping of external pin names to internal connection targets
   */
  connections?: Connections;

  /**
   * Arrangement for pins when rendered as a schematic box
   */
  schPinArrangement?: SchematicPinArrangement;

  /**
   * Spacing between pins when rendered as a schematic box
   * @deprecated Use schPinStyle instead.
   */
  schPinSpacing?: Distance;

  /**
   * Styles to apply to individual pins in the schematic box representation
   */
  schPinStyle?: SchematicPinStyle;

  pcbWidth?: Distance;
  pcbHeight?: Distance;
  minTraceWidth?: Distance;
  nominalTraceWidth?: Distance;
  schWidth?: Distance;
  schHeight?: Distance;

  pcbLayout?: LayoutConfig;
  schLayout?: LayoutConfig;
  cellBorder?: Border | null;
  border?: Border | null;
  schPadding?: Distance;
  schPaddingLeft?: Distance;
  schPaddingRight?: Distance;
  schPaddingTop?: Distance;
  schPaddingBottom?: Distance;

  pcbPadding?: Distance;
  pcbPaddingLeft?: Distance;
  pcbPaddingRight?: Distance;
  pcbPaddingTop?: Distance;
  pcbPaddingBottom?: Distance;
  /**
   * Anchor to use when interpreting pcbX/pcbY/pcbOffsetX/pcbOffsetY relative to pcbPosition
   */
  pcbAnchorAlignment?: AutocompleteString<z.infer<typeof ninePointAnchor>>;

  /** @deprecated Use `pcbGrid` */
  grid?: boolean;
  /** @deprecated Use `pcbFlex` */
  flex?: boolean | string;

  pcbGrid?: boolean;
  pcbGridCols?: number | string;
  pcbGridRows?: number | string;
  pcbGridTemplateRows?: string;
  pcbGridTemplateColumns?: string;
  pcbGridTemplate?: string;
  pcbGridGap?: number | string;
  pcbGridRowGap?: number | string;
  pcbGridColumnGap?: number | string;

  pcbFlex?: boolean | string;
  pcbFlexGap?: number | string;
  pcbFlexDirection?: "row" | "column";
  pcbAlignItems?: "start" | "center" | "end" | "stretch";
  pcbJustifyContent?:
    | "start"
    | "center"
    | "end"
    | "stretch"
    | "space-between"
    | "space-around"
    | "space-evenly";
  pcbFlexRow?: boolean;
  pcbFlexColumn?: boolean;
  pcbGap?: number | string;
  pcbPack?: boolean;
  pcbPackGap?: number | string;

  schGrid?: boolean;
  schGridCols?: number | string;
  schGridRows?: number | string;
  schGridTemplateRows?: string;
  schGridTemplateColumns?: string;
  schGridTemplate?: string;
  schGridGap?: number | string;
  schGridRowGap?: number | string;
  schGridColumnGap?: number | string;

  schFlex?: boolean | string;
  schFlexGap?: number | string;
  schFlexDirection?: "row" | "column";
  schAlignItems?: "start" | "center" | "end" | "stretch";
  schJustifyContent?:
    | "start"
    | "center"
    | "end"
    | "stretch"
    | "space-between"
    | "space-around"
    | "space-evenly";
  schFlexRow?: boolean;
  schFlexColumn?: boolean;
  schGap?: number | string;
  schPack?: boolean;
  schMatchAdapt?: boolean;
}

Source

CircleHoleProps <hole />

export interface CircleHoleProps extends PcbLayoutProps {
  name?: string;
  shape?: "circle";
  diameter?: Distance;
  radius?: Distance;
  solderMaskMargin?: Distance;
  coveredWithSolderMask?: boolean;
}

Source

IbisModelProps <ibismodel />

export interface IbisModelProps extends IbisModelDefinition {
  /** Selector for exactly one source component in this subcircuit. */
  componentRef: string;
}

Source

InductorProps <inductor />

export interface InductorProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  inductance: number | string;
  maxCurrentRating?: number | string;
  schOrientation?: SchematicOrientation;
  connections?: Connections<InductorPinLabels>;
}

Source

InterconnectProps <interconnect />

export interface InterconnectProps extends CommonComponentProps {
  standard?: "TSC0001_36P_XALT_2025_11" | "0805" | "0603" | "1206";
  pinLabels?: Record<
    number | SchematicPinLabel,
    SchematicPinLabel | SchematicPinLabel[]
  >;
  /**
   * Groups of pins that are internally connected
   * e.g., [["1","2"], ["2","3"]]
   */
  internallyConnectedPins?: (string | number)[][];
}

Source

InternalCircuitProps <internalcircuit />

export interface InternalCircuitProps {
  children?: ReactNode;
}

Source

JumperProps <jumper />

export interface JumperProps extends CommonComponentProps {
  manufacturerPartNumber?: string;
  pinLabels?: Record<
    number | SchematicPinLabel,
    SchematicPinLabel | SchematicPinLabel[]
  >;
  schPinStyle?: SchematicPinStyle;
  /** @deprecated Use schPinStyle instead. */
  schPinSpacing?: number | string;
  schWidth?: number | string;
  schHeight?: number | string;
  schDirection?: "left" | "right";
  schPinArrangement?: SchematicPortArrangement;
  /**
   * @deprecated Use schPinArrangement instead.
   */
  schPortArrangement?: SchematicPortArrangement;
  /**
   * Labels for PCB pins
   */
  pcbPinLabels?: Record<string, string>;
  /**
   * Number of pins on the jumper (2 or 3)
   */
  pinCount?: 2 | 3;
  /**
   * Groups of pins that are internally connected
   * e.g., [["1","2"], ["2","3"]]
   */
  internallyConnectedPins?: (string | number)[][];
  /**
   * Connections to other components
   */
  connections?: Connections<string>;
}

Source

LedProps <led />

export type LedProps = z.input<typeof ledProps>;

Source

MosfetProps <mosfet />

export interface MosfetProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  channelType: "n" | "p";
  mosfetMode: "enhancement" | "depletion";
  /** The side of the schematic symbol where the drain port is placed. */
  symbolDrainSide?: "left" | "right" | "top" | "bottom";
  /** The side of the schematic symbol where the source port is placed. */
  symbolSourceSide?: "left" | "right" | "top" | "bottom";
  /** The side of the schematic symbol where the gate port is placed. */
  symbolGateSide?: "left" | "right" | "top" | "bottom";
  connections?: Connections<MosfetPinLabels>;
}

Source

MountedBoardProps <mountedboard />

export interface MountedBoardProps
  extends SubcircuitGroupProps, MountedBoardChipProps {
  boardToBoardDistance?: Distance;
  mountOrientation?: "faceDown" | "faceUp";
}

Source

NetProps <net />

export interface NetProps {
  name: string;
  connectsTo?: string | string[];
  routingPhaseIndex?: number | null;
  highlightColor?: string;
  isPowerNet?: boolean;
  isGroundNet?: boolean;
  nominalTraceWidth?: Distance;
}

Source

NetAliasProps <netalias />

export interface NetAliasProps {
  net?: string;
  connection?: string;
  schX?: number | string;
  schY?: number | string;
  schRotation?: number | string;
  anchorSide?: "left" | "top" | "right" | "bottom";
}

Source

NetLabelProps <netlabel />

export interface NetLabelProps {
  net?: string;
  connection?: string;
  connectsTo?: string | string[];
  /**
   * Render the net name along its schematic trace instead of as an anchored
   * label. Inline placement is automatic, so schematic anchor positioning
   * props are ignored.
   */
  inline?: boolean;
  schX?: number | string;
  schY?: number | string;
  schRotation?: number | string;
  anchorSide?: "left" | "top" | "right" | "bottom";
}

Source

OpAmpProps <opamp />

export interface OpAmpProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  connections?: Connections<OpAmpPinLabels>;
}

Source

PanelProps <panel />

export interface PanelProps extends Omit<
  BaseGroupProps,
  "height" | "layoutMode" | "width"
> {
  width?: Distance;
  height?: Distance;
  children?: BaseGroupProps["children"];
  anchorAlignment?: z.infer<typeof ninePointAnchor>;
  /**
   * If true, prevent a solder mask from being applied to this panel.
   */
  noSolderMask?: boolean;
  /**
   * Method used to separate boards in the panel.
   *
   * `outline_routing` creates continuous routed cutouts around each board
   * outline without tabs.
   */
  panelizationMethod?: "tab-routing" | "outline_routing" | "none";
  /** Gap between boards in a panel */
  boardGap?: Distance;
  layoutMode?: "grid" | "pack" | "none";
  row?: number;
  col?: number;
  cellWidth?: Distance;
  cellHeight?: Distance;
  tabWidth?: Distance;
  tabLength?: Distance;
  mouseBites?: boolean;
  edgePadding?: Distance;
  edgePaddingLeft?: Distance;
  edgePaddingRight?: Distance;
  edgePaddingTop?: Distance;
  edgePaddingBottom?: Distance;
  _subcircuitCachingEnabled?: boolean;
}

Source

PcbBendProps <pcbbend />

export interface PcbBendProps {
  name?: string;
  /** Start/end of the bend-zone centerline in the parent PCB coordinate system. */
  x1: Distance;
  y1: Distance;
  x2: Distance;
  y2: Distance;
  /** Signed degrees (or an angle string). Positive folds toward the local top face. */
  bendAngle: number | string;
  /** Positive neutral-surface radius, in mm or a distance string. */
  bendRadius: Distance;
  /**
   * Radius of circular tear-relief cutouts c