Skip to content

Add documentation for SPICE simulation elements#428

Open
seveibar wants to merge 1 commit intomainfrom
codex/document-undocumented-tscircuit-elements
Open

Add documentation for SPICE simulation elements#428
seveibar wants to merge 1 commit intomainfrom
codex/document-undocumented-tscircuit-elements

Conversation

@seveibar
Copy link
Contributor

@seveibar seveibar commented Feb 2, 2026

Motivation

  • Several SPICE-related JSX elements used in simulation guides were undocumented, causing confusion when examples referenced them (e.g. <analogsimulation />, <voltagesource />, <voltageprobe />).
  • Provide clear usage, examples, and properties so users can run and interpret analog simulations in tscircuit projects.

Description

  • Added docs/elements/analogsimulation.mdx documenting <analogsimulation /> with an overview, example CircuitPreview, and a properties table for duration, timePerStep, and spiceEngine.
  • Added docs/elements/voltagesource.mdx documenting <voltagesource /> with waveform options, placement example, and a properties table including waveShape, frequency, amplitude, offset, and dutyCycle.
  • Added docs/elements/voltageprobe.mdx documenting <voltageprobe /> with example usage, differential measurement pattern, and properties including connectsTo and referenceTo.
  • Each doc includes a runnable example snippet rendered via the CircuitPreview component to illustrate integration with traces, probes, and simulation configuration.

Testing

  • Ran bunx tsc --noEmit to typecheck the repo and it completed successfully.
  • Ran bun run format (biome) which formatted files successfully.
  • Attempted bun update --latest some-dep which failed with a 404 from the registry (package not found).

Codex Task

@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 2, 2026 7:46pm

Request Review

@ShiboSoftwareDev
Copy link
Contributor

is solver the correct word here?
image

@ShiboSoftwareDev
Copy link
Contributor

this circuit: https://docs-ine7r6vwr-tscircuit.vercel.app/elements/voltagesource
shows a voltage of 0, I think it's because the voltage probe is only measuring one side because it won't reference GND when there is no GND net in the circuit, is this an issue that needs fixing?

@seveibar
Copy link
Contributor Author

seveibar commented Feb 2, 2026

Nice finds, can you steal this pr? @ShiboSoftwareDev

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants