🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@programsmagic/toon-frontend

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@programsmagic/toon-frontend

React components for agent visualization with animated toon styling

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@toon/frontend

React components for agent visualization with animated toon styling.

Installation

npm install @toon/frontend
# or
pnpm add @toon/frontend
# or
yarn add @toon/frontend

Quick Start

import { AgentVisualizer } from '@toon/frontend';
import '@toon/frontend/styles';

function App() {
  return (
    <AgentVisualizer
      url="http://localhost:3000/events"
      protocol="sse"
      autoConnect={true}
    />
  );
}

Components

AgentVisualizer

Main visualization component for agent events.

<AgentVisualizer
  url="http://localhost:3000/events"
  protocol="sse"
  autoConnect={true}
  showTimeline={true}
  showFlowDiagram={false}
/>

useAgentStream Hook

React hook for connecting to agent event streams.

import { useAgentStream } from '@toon/frontend';

function MyComponent() {
  const { events, isConnected, connect, disconnect } = useAgentStream({
    url: 'http://localhost:3000/events',
    protocol: 'sse',
  });

  return (
    <div>
      <button onClick={connect}>Connect</button>
      <button onClick={disconnect}>Disconnect</button>
      <div>Events: {events.length}</div>
    </div>
  );
}

EventTimeline

Component for displaying a timeline of events.

import { EventTimeline } from '@toon/frontend';

<EventTimeline events={events} maxEvents={100} />

ActionCard

Component for displaying individual action events.

import { ActionCard } from '@toon/frontend';

<ActionCard event={event} index={0} />

FlowDiagram

Component for visualizing agent flows.

import { FlowDiagram } from '@toon/frontend';

<FlowDiagram events={events} flows={flows} />

Styling

Import the default "toon" theme:

import '@toon/frontend/styles';

Or customize CSS variables:

:root {
  --toon-primary: #your-color;
  --toon-secondary: #your-color;
  /* ... */
}

Examples

See the examples directory for complete examples.

Documentation

See the full documentation.

License

MIT

Keywords

react

FAQs

Package last updated on 09 Nov 2025

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