Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

circuitsvis

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circuitsvis

Mechanistic Interpretability Visualizations

  • 1.15.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
447
increased by2.05%
Maintainers
1
Weekly downloads
 
Created
Source

CircuitsVis

Mechanistic Interpretability visualizations in React.

View all available components in Storybook at https://alan-cooney.github.io/CircuitsVis .

Use

Within a React Project

First install the package:

yarn add circuitsvis

Then import and use the visualizations directly:

import { Hello } from "circuitsvis";

export function Demo() {
  return <Hello name="Bob" />;
}

Standalone

You can use this package directly from a CDN (e.g. unpkg) to render visualizations.

Modern ES Modules Approach
<div id="my-div-id" />

<script crossorigin type="module">
  import { render, Hello } from "https://unpkg.com/circuitsvis/dist/cdn/esm.js";

  render(
    "my-div-id", // Div to render into
    Hello, // Visualization function
    { name: "Bob" } // Props (arguments) for visualisation
  );
</script>
ES6 Approach (supports more legacy browsers)
<div id="my-div-id" />

<script
  crossorigin
  src="https://unpkg.com/circuitsvis/dist/cdn/iife.js"
  onload="onCircuitsVisLoad()"
></script>

<script>
  function onCircuitsVisLoad() {
    "{";
  }
  CircuitsVis.render(
    "{uuid}", // Div to render into
    CircuitsVis.Hello, // Visualization function
    { name: "Bob" } // Props (arguments) for visualisation
  );
  {
    ("}");
  }
</script>

Within a Python project

See https://github.com/alan-cooney/CircuitsVis for details of how to use this library within a Python project.

FAQs

Package last updated on 30 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc