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.613

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 | | <analogsimulation /> | AnalogSimulationProps | | <analog.sweepparameter /> | AnalogResistanceSweepParameterProps | | <analog.transientsimulation /> | AnalogTransientSimulationProps | | <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 | | <inductor /> | InductorProps | | <interconnect /> | InterconnectProps | | <internalcircuit /> | InternalCircuitProps | | <jumper /> | JumperProps | | <led /> | LedProps | | <mosfet /> | MosfetProps | | <mountedboard /> | MountedBoardProps | | <net /> | NetProps | | <netalias /> | NetAliasProps | | <netlabel /> | NetLabelProps | | <opamp /> | OpAmpProps | | <panel /> | PanelProps | | <pcbkeepout /> | PcbKeepoutProps | | <pcbnotedimension /> | PcbNoteDimensionProps | | <pcbnoteline /> | PcbNoteLineProps | | <pcbnotepath /> | PcbNotePathProps | | <pcbnoterect /> | PcbNoteRectProps | | <pcbnotetext /> | PcbNoteTextProps | | <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 | | <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;
  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

AnalogSimulationProps <analogsimulation />

export interface AnalogSimulationProps {
  name?: string;
  simulationType?: "spice_transient_analysis";
  duration?: number | string;
  startTime?: number | string;
  timePerStep?: number | string;
  spiceEngine?: AutocompleteString<"spicey" | "ngspice">;
  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;
}

Source

AutoroutingPhaseProps <autoroutingphase />

export interface AutoroutingPhaseProps extends RoutingTolerances, FanoutProps {
  key?: any;
  name?: string;
  autorouter?: AutorouterProp;
  phaseIndex?: number;
  region?: {
    shape?: "rect";
    minX: number;
    maxX: number;
    minY: number;
    maxY: number;
  };
  connection?: string;
  connections?: string[];
  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"
> {
  title?: string;
  material?: "fr4" | "fr1" | "flex";
  /** Number of layers for the PCB */
  layers?: 1 | 2 | 4 | 6 | 8 | 10;
  borderRadius?: Distance;
  thickness?: Distance;
  boardAnchorPosition?: Point;
  anchorAlignment?: z.infer<typeof ninePointAnchor>;
  boardAnchorAlignment?: z.infer<typeof ninePointAnchor>;
  /** 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 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.
   */
  autorouter?: AutorouterProp;
  padding?: Distance;
  paddingLeft?: Distance;
  paddingRight?: Distance;
  paddingTop?: Distance;
  paddingBottom?: Distance;
}

Source

BreakoutPointProps <breakoutpoint />

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

Source

BusProps <bus />

export interface BusProps {
  name?: string;
  /** 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 characteristic impedance. Raw numbers are ohms. */
  targetImpedance?: 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[];
}

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 {
  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;
  maxDecouplingTraceLength?: number;
  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 standard, e.g. usb_c, m2
   */
  standard?: "usb_c" | "m2";
}

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;
  unbroken?: boolean;
  padMargin?: Distance;
  traceMargin?: Distance;
  clearance?: Distance;
  boardEdgeMargin?: Distance;
  cutoutMargin?: Distance;
  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;
  mpn?: 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;
  /** 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 characteristic impedance. Raw numbers are ohms. */
  targetDifferentialImpedance?: 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;
}

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?: string | 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;
}

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

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[];
  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 for panelization */
  panelizationMethod?: "tab-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

PcbKeepoutProps <pcbkeepout />

export type PcbKeepoutProps = z.input<typeof pcbKeepoutProps>;

Source

PcbNoteDimensionProps <pcbnotedimension />

export interface PcbNoteDimensionProps extends Omit<
  PcbLayoutProps,
  | "pcbLeftEdgeX"
  | "pcbRightEdgeX"
  | "pcbTopEdgeY"
  | "pcbBottomEdgeY"
  | "pcbX"
  | "pcbY"
  | "pcbOffsetX"
  | "pcbOffsetY"
  | "pcbRotation"
> {
  from: string | Point;
  to: string | Point;
  text?: string;
  offset?: string | number;
  font?: "tscircuit2024";
  fontSize?: string | number;
  color?: string;
  arrowSize?: string | number;
  units?: "in" | "mm";
  outerEdgeToEdge?: true;
  centerToCenter?: true;
  innerEdgeToEdge?: true;
}

Source

PcbNoteLineProps <pcbnoteline />

export interface PcbNoteLineProps extends Omit<
  PcbLayoutProps,
  | "pcbLeftEdgeX"
  | "pcbRightEdgeX"
  | "pcbTopEdgeY"
  | "pcbBottomEdgeY"
  | "pcbX"
  | "pcbY"
  | "pcbOffsetX"
  | "pcbOffsetY"
  | "pcbRotation"
> {
  x1: string | number;
  y1: string | number;
  x2: string | number;
  y2: string | number;
  strokeWidth?: string | number;
  color?: string;
  isDashed?: boolean;
}

Source

PcbNotePathProps <pcbnotepath />

export interface PcbNotePathProps extends Omit<
  PcbLayoutProps,
  | "pcbLeftEdgeX"
  | "pcbRightEdgeX"
  | "pcbTopEdgeY"
  | "pcbBottomEdgeY"
  | "pcbX"
  | "pcbY"
  | "pcbOffsetX"
  | "pcbOffsetY"
  | "pcbRotation"
> {
  route: RouteHintPointInput[];
  strokeWidth?: string | number;
  color?: string;
}

Source

PcbNoteRectProps <pcbnoterect />

export interface PcbNoteRectProps extends Omit<PcbLayoutProps, "pcbRotation"> {
  width: string | number;
  height: string | number;
  strokeWidth?: string | number;
  isFilled?: boolean;
  hasStroke?: boolean;
  isStrokeDashed?: boolean;
  color?: string;
  cornerRadius?: string | number;
}

Source

PcbNoteTextProps <pcbnotetext />

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

Source

PcbTraceProps <pcbtrace />

export type PcbTraceProps = z.input<typeof pcbTraceProps>;

Source

PinHeaderProps <pinheader />

export interface PinHeaderProps extends CommonComponentProps {
  /**
   * Number of pins in the header
   */
  pinCount: number;

  /**
   * Distance between pins
   */
  pitch?: number | string;

  /**
   * Schematic facing direction
   */
  schFacingDirection?: "up" | "down" | "left" | "right";

  /**
   * Whether the header is male, female, or unpopulated
   */
  gender?: "male" | "female" | "unpopulated";

  /**
   * Whether to show pin labels in silkscreen
   */
  showSilkscreenPinLabels?: boolean;

  /**
   * Labels for PCB pins
   */
  pcbPinLabels?: Record<string, string>;

  /**
   * Whether the header has two rows of pins
   */
  doubleRow?: boolean;

  /**
   * If true, the header is a right-angle style connector
   */
  rightAngle?: boolean;

  /**
   * Orientation of the header on the PCB
   */
  pcbOrientation?: PcbOrientation;

  /**
   * Diameter of the through-hole for each pin
   */
  holeDiameter?: number | string;

  /**
   * Diameter of the plated area around each hole
   */
  platedDiameter?: number | string;

  /**
   * Labels for each pin
   */
  pinLabels?: Record<string, SchematicPinLabel> | SchematicPinLabel[];

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

  /**
   * Direction the header is facing
   */
  facingDirection?: "left" | "right";

  /**
   * Pin arrangement in schematic view
   */
  schPinArrangement?: SchematicPinArrangement;

  /**
   * Schematic pin style (margins, etc)
   */
  schPinStyle?: SchematicPinStyle;

  /**
   * Schematic pin spacing
   * @deprecated Use schPinStyle instead.
   */
  schPinSpacing?: number | string;

  /**
   * Schematic width
   */
  schWidth?: number | string;

  /**
   * Schematic height
   */
  schHeight?: number | string;
}

Source

CirclePlatedHoleProps <platedhole />

export interface CirclePlatedHoleProps extends Omit<
  PcbLayoutProps,
  "pcbRotation" | "layer"
> {
  name?: string;
  connectsTo?: string | string[];
  shape: "circle";
  holeDiameter: number | string;
  outerDiameter: number | string;
  padDiameter?: number | string;
  portHints?: PortHints;
  solderMaskMargin?: Distance;
  coveredWithSolderMask?: boolean;
}

Source

PortProps <port />

export type PortProps = z.input<typeof portProps>;

Source

PotentiometerProps <potentiometer />

export interface PotentiometerProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  maxResistance: number | string;
  pinVariant?: PotentiometerPinVariant;
  connections?: Connections<PotentiometerPinLabels>;
}

Source

PowerSourceProps <powersource />

export type PowerSourceProps = z.input<typeof powerSourceProps>;

Source

PushButtonProps <pushbutton />

export type PushButtonProps<T extends PinLabelsProp | string = string> =
  ChipProps<T>;

Source

ResistorProps <resistor />

export interface ResistorProps<
  PinLabel extends string = string,
> extends CommonComponentProps<PinLabel> {
  resistance: number | string;
  tolerance?: number | string;
  pullupFor?: string;
  pullupTo?: string;
  pulldownFor?: string;
  pulldownTo?: string;
  schOrientation?: SchematicOrientation;
  schSize?: SchematicSymbolSize;
  connections?: Connections<ResistorPinLabels>;
}

Source

ResonatorProps <resonator />

export interface ResonatorProps extends CommonComponentProps {
  frequency: number | string;
  loadCapacitance: number | string;
  pinVariant?: ResonatorPinVariant;
}

Source

SchematicArcProps <schematicarc />

export interface SchematicArcProps {
  center: Point;
  radius: Distance;
  startAngleDegrees: number | string;
  endAngleDegrees: number | string;
  direction?: "clockwise" | "counterclockwise";
  strokeWidth?: Distance;
  color?: string;
  isDashed?: boolean;
}

Source

SchematicBoxProps <schematicbox />

export interface SchematicBoxProps {
  name?: string;
  chipRef?: string;
  pinLabels?: PinLabelsProp;
  schPinArrangement?: SchematicPinArrangement;
  schX?: Distance;
  schY?: Distance;
  schSectionName?: string;
  schSheetName?: string;
  width?: Distance;
  height?: Distance;
  overlay?: string[];
  padding?: Distance;
  paddingLeft?: Distance;
  paddingRight?: Distance;
  paddingTop?: Distance;
  paddingBottom?: Distance;
  title?: string;
  titleAlignment?: z.infer<typeof ninePointAnchor>;
  titleColor?: string;
  titleFontSize?: Distance;
  titleInside?: boolean;
  strokeStyle?: "solid" | "dashed";
}

Source

SchematicCellProps <schematiccell />

export interface SchematicCellProps {
  children?: string;
  horizontalAlign?: "left" | "center" | "right";
  verticalAlign?: "top" | "middle" | "bottom";
  fontSize?: number | string;
  rowSpan?: number;
  colSpan?: number;
  width?: number | string;
  text?: string;
}

Source

SchematicCircleProps <schematiccircle />

export interface SchematicCircleProps {
  center: Point;
  radius: Distance;
  strokeWidth?: Distance;
  color?: string;
  isFilled?: boolean;
  fillColor?: string;
  isDashed?: boolean;
}

Source

SchematicLineProps <schematicline />

export interface SchematicLineProps {
  x1: Distance;
  y1: Distance;
  x2: Distance;
  y2: Distance;
  strokeWidth?: Distance;
  color?: string;
  isDashed?: boolean;
  dashLength?: Distance;
  dashGap?: Distance;
}

Source

SchematicPathProps <schematicpath />

export interface SchematicPathProps {
  points?: Point[];
  svgPath?: string;
  strokeWidth?: Distance;
  strokeColor?: string;
  dashLength?: Distance;
  dashGap?: Distance;
  isFilled?: boolean;
  fillColor?: string;
}

Source

SchematicRectProps <schematicrect />

export interface SchematicRectProps {
  schX?: Distance;
  schY?: Distance;
  width: Distance;
  height: Distance;
  rotation?: number | string;
  strokeWidth?: Distance;
  color?: string;
  isFilled?: boolean;
  fillColor?: string;
  isDashed?: boolean;
}

Source

SchematicRowProps <schematicrow />

export interface SchematicRowProps {
  children?: any;
  height?: number | string;
}

Source

SchematicSectionProps <schematicsection />

export interface SchematicSectionProps {
  displayName?: string;
  name: string;
  sectionTitleFontSize?: number | string;
}

Source

SchematicSheetProps <schematicsheet />

export interface SchematicSheetProps {
  name: string;
  displayName: string;
  sheetIndex?: number;
  children?: any;
}

Source

SchematicSymbolProps <schematicsymbol />

export interface SchematicSymbolProps {
  /** Stable name for this representation, such as `A` or `B`. */
  name: string;
  /** Optional human-facing name shown in the schematic. */
  displayName?: string;
  /** Selector for the physical component represented by this symbol. */
  chipRef?: string;
  /** Name of the symbol from the schematic-symbol library. */
  symbolName: string;
  /** Maps symbol port labels to physical component port selectors. */
  connections?: Connections;
  schX?: Distance;
  schY?: Distance;
  schRotation?: number | string;
  schSectionName?: string;
  schSheetName?: string;
}

Source

SchematicTableProps <schematictable />

export interface SchematicTableProps {
  schX?: number | string;
  schY?: number | string;
  children?: any;
  cellPadding?: number | string;
  borderWidth?: number | string;
  anchor?: z.infer<typeof ninePointAnchor>;
  fontSize?: number | string;
}

Source

SchematicTextProps <schematictext />

export interface SchematicTextProps {
  schX?: Distance;
  schY?: Distance;
  text: string;
  fontSize?: number;
  anchor?: z.infer<typeof fivePointAnchor> | z.infer<typeof ninePointAnchor>;
  color?: string;
  schRotation?: number | string;
}

Source

SilkscreenCircleProps <silkscreencircle />

export type SilkscreenCircleProps = z.input<typeof silkscreenCircleProps>;

Source

SilkscreenGraphicProps <silkscreengraphic />

export interface SilkscreenGraphicProps {
  /**
   * URL or static-file import for the source image. tscircuit/core converts the
   * image into the pcb_silkscreen_graphic BRep in circuit-json.
   */
  imageUrl: string;
  /** Width of the rendered silkscreen graphic on the PCB. */
  width: Distance;
  /** Height of the rendered silkscreen graphic on the PCB. */
  height: Distance;
  /** PCB layer for the silkscreen graphic. */
  layer?: VisibleLayer;
  pcbX?: string | number;
  pcbY?: string | number;
  pcbLeftEdgeX?: string | number;
  pcbRightEdgeX?: string | number;
  pcbTopEdgeY?: string | number;
  pcbBottomEdgeY?: string | number;
  pcbOffsetX?: string | number;
  pcbOffsetY?: string | number;
  pcbRotation?: string | number;
  pcbPositionAnchor?: string;
  pcbPositionMode?:
    | "relative_to_group_anchor"
    | "auto"
    | "relative_to_board_anchor"
    | "relative_to_component_anchor";
  shouldBeOnEdgeOfBoard?: boolean;
  pcbMarginTop?: string | number;
  pcbMarginRight?: string | number;
  pcbMarginBottom?: string | number;
  pcbMarginLeft?: string | number;
  pcbMarginX?: string | number;
  pcbMarginY?: string | number;
  pcbRelative?: boolean;
  relative?: boolean;
}

Source

SilkscreenLineProps <silkscreenline />

export type SilkscreenLineProps = z.input<typeof silkscreenLineProps>;

Source

SilkscreenPathProps <silkscreenpath />

export type SilkscreenPathProps = z.input<typeof silkscreenPathProps>;

Source

SilkscreenRectProps <silkscreenrect />

export type SilkscreenRectProps = z.input<typeof silkscreenRectProps>;

[Source](https://gi