Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow Collapse Component

From Leeroopedia
Revision as of 11:20, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Infiniflow_Ragflow_Collapse_Component.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Frontend, UI_Components
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete collapsible container components with expand/collapse state management and optional right content slot provided by the RAGFlow frontend.

Description

Exports two components: Collapse for simple collapsible panels with title and right content, and NodeCollapsible for collapsible item arrays with generic type support and count indicators.

Usage

Import Collapse for settings panels or form sections that can be toggled. Import NodeCollapsible for lists of items (e.g., agent nodes) that can be collapsed.

Code Reference

Source Location

Signature

export function Collapse(props: {
  title: string;
  rightContent?: ReactNode;
  open?: boolean;
  children: ReactNode;
}): JSX.Element;

export function NodeCollapsible<T extends any[]>(props: {
  title: string;
  items: T;
  children: (items: T) => ReactNode;
  open?: boolean;
}): JSX.Element;

Import

import { Collapse, NodeCollapsible } from '@/components/collapse';

I/O Contract

Inputs

Name Type Required Description
title string Yes Header text for the collapsible section
open boolean No Initial open state
children ReactNode Yes Content to collapse/expand

Outputs

Name Type Description
Rendered JSX JSX.Element Collapsible panel with toggle

Usage Examples

import { Collapse, NodeCollapsible } from '@/components/collapse';

<Collapse title="Advanced Settings">
  <SettingsForm />
</Collapse>

<NodeCollapsible title="Operators" items={operators}>
  {(items) => items.map(op => <OperatorCard key={op.id} {...op} />)}
</NodeCollapsible>

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment