Skip to content

API Reference

The All4One component is highly configurable through props.

Props

PropTypeDefaultDescription
dataJsonDataundefinedThe organization chart data (nodes and optional edges).
layoutStyleLayoutStyle'default'The layout style to use. See Layouts.
nodeThemeNodeTheme'default'The visual theme of the nodes.
layoutDirectionLayoutDirection'TB'Direction of the hierarchy (TB, BT, LR, RL).
edgeTypeEdgeStyle'oval-edge'Styling of the connection lines.
backgroundVariantBackgroundVariant'dots'Background pattern (dots, lines, cross).
backgroundColorstringundefinedCustom background color.
edgeAnimatedbooleanfalseWhether to animate the edges (marching ants).
edgeColorstringundefinedCustom color for edges.
nodeBorderWidthnumber2Thickness of node borders.
collapsiblebooleanfalseEnables expand/collapse functionality on nodes.

Types

LayoutStyle

  • default: Standard hierarchical layout.
  • grid: Arranges nodes in a grid format.
  • treeLeftOffset: Tree layout with children offset to the left.
  • treeRightOffset: Tree layout with children offset to the right.
  • treeLeft: Compact tree layout aligned left.
  • treeRight: Compact tree layout aligned right.

NodeTheme

  • default: Clean, minimal design.
  • modern: Bold colors and soft shadows.
  • glass: Frosted glass effect (Glassmorphism).
  • neon: High-contrast dark mode with glowing borders.
  • corporate: Formal design suitable for enterprise environments.

EdgeStyle

  • straight-edge: Direct lines between nodes.
  • oval-edge: Smooth, rounded paths.
  • curved-edge: Elegant Bézier curves.
  • straight-edge-parent: Straight lines that align with the parent's side.
  • oval-edge-parent: Rounded lines that align with the parent's side.

Released under the Apache License.