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

react-thinking-panel

v1.1.3

Published

A React component that replicates the Gemini Deep Research thinking panel style with expandable sections and source links

Readme

react-thinking-panel

A React component that replicates the Gemini Deep Research thinking panel style with expandable sections and source links.

npm license

Features

  • 📍 Timeline Design - Vertical line with dot markers for flow visualization
  • 🎨 CSS Variables - Fully customizable colors via CSS custom properties
  • 🌙 Dark Mode - Built-in dark mode support (auto or manual)
  • 🔧 Flexible Icons - Built-in icons or custom React nodes
  • 📦 TypeScript - Full type definitions included
  • 🪶 Lightweight - No dependencies (peer dependency on React only)

Installation

npm install react-thinking-panel
# or
yarn add react-thinking-panel
# or
pnpm add react-thinking-panel

Quick Start

import { ThinkingPanel } from 'react-thinking-panel';
import 'react-thinking-panel/styles.css';

function App() {
  const [expanded, setExpanded] = useState(true);

  return (
    <ThinkingPanel
      title="思路"
      expanded={expanded}
      onToggle={() => setExpanded(!expanded)}
      sections={[
        {
          icon: 'sparkle',
          title: 'Analysis',
          content: 'Analyzing the problem...'
        },
        {
          icon: 'brain',
          title: 'Deep Thinking',
          content: ['First paragraph.', 'Second paragraph.']
        }
      ]}
    />
  );
}

API Reference

ThinkingPanelProps

| Prop | Type | Default | Description | |------|------|---------|-------------| | title | string | '思路' | Panel header title | | titleIcon | ReactNode | - | Custom icon before title | | expanded | boolean | true | Whether panel is expanded | | onToggle | () => void | - | Toggle callback | | sections | ThinkingSection[] | required | Thinking sections | | researching | ResearchingSection | - | Source links section | | className | string | - | Container class | | headerClassName | string | - | Header class | | contentClassName | string | - | Content area class | | darkMode | boolean | - | Force dark mode | | style | CSSProperties | - | Inline styles |

ThinkingSection

| Prop | Type | Description | |------|------|-------------| | title | string | Section title | | content | string \| string[] | Paragraph(s) content | | icon | 'sparkle' \| 'search' \| 'brain' \| 'bulb' \| string | Built-in or emoji icon | | iconNode | ReactNode | Custom icon (overrides icon) | | className | string | Section class |

ResearchingSection

| Prop | Type | Description | |------|------|-------------| | title | string | Section title | | icon | 'google' \| 'search' \| string | Built-in or emoji icon | | iconNode | ReactNode | Custom icon | | links | SourceLink[] | Source links | | className | string | Section class |

SourceLink

| Prop | Type | Description | |------|------|-------------| | domain | string | Domain name (e.g., "github.com") | | title | string | Link title | | url | string | Full URL | | icon | string | Custom favicon URL |

Customization

CSS Variables

Override these CSS custom properties to customize colors:

:root {
  /* Light Mode */
  --tp-bg: #ffffff;
  --tp-border: #e5e7eb;
  --tp-title-color: #374151;
  --tp-section-icon-color: #f59e0b;
  --tp-paragraph-color: #4b5563;
  
  /* Timeline */
  --tp-timeline-line-color: #e5e7eb;
  --tp-timeline-dot-color: #3b82f6;
  --tp-timeline-dot-size: 8px;
  --tp-timeline-line-width: 2px;
  /* ... see styles.css for all variables */
}

Dark Mode

Auto (via media query):

@media (prefers-color-scheme: dark) {
  :root { /* dark colors */ }
}

Manual:

<ThinkingPanel darkMode={true} ... />

Or apply .tp-dark class to a parent element.

Custom Icons

import { FaRobot } from 'react-icons/fa';

<ThinkingPanel
  sections={[
    {
      title: 'Custom Icon',
      content: 'Using react-icons',
      iconNode: <FaRobot size={16} color="#4285F4" />
    }
  ]}
/>

Example with Researching Section

<ThinkingPanel
  title="Deep Research"
  expanded={expanded}
  onToggle={() => setExpanded(!expanded)}
  sections={[
    { icon: 'sparkle', title: 'Analysis', content: '...' }
  ]}
  researching={{
    title: 'Researching websites',
    icon: 'google',
    links: [
      { domain: 'github.com', title: 'Repository', url: 'https://github.com/...' },
      { domain: 'arxiv.org', title: 'Paper', url: 'https://arxiv.org/...' }
    ]
  }}
/>

License

MIT