New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-thinking-panel

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-thinking-panel

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

latest
npmnpm
Version
1.1.3
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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

PropTypeDefaultDescription
titlestring'思路'Panel header title
titleIconReactNode-Custom icon before title
expandedbooleantrueWhether panel is expanded
onToggle() => void-Toggle callback
sectionsThinkingSection[]requiredThinking sections
researchingResearchingSection-Source links section
classNamestring-Container class
headerClassNamestring-Header class
contentClassNamestring-Content area class
darkModeboolean-Force dark mode
styleCSSProperties-Inline styles

ThinkingSection

PropTypeDescription
titlestringSection title
contentstring | string[]Paragraph(s) content
icon'sparkle' | 'search' | 'brain' | 'bulb' | stringBuilt-in or emoji icon
iconNodeReactNodeCustom icon (overrides icon)
classNamestringSection class

ResearchingSection

PropTypeDescription
titlestringSection title
icon'google' | 'search' | stringBuilt-in or emoji icon
iconNodeReactNodeCustom icon
linksSourceLink[]Source links
classNamestringSection class
PropTypeDescription
domainstringDomain name (e.g., "github.com")
titlestringLink title
urlstringFull URL
iconstringCustom 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

Keywords

react

FAQs

Package last updated on 13 Jan 2026

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