sigilUI

Hub Spoke Diagram

A hub-and-spoke layout with a central node connected to left and right spoke nodes.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { HubSpokeDiagram } from "@sigil-ui/components";

Usage

<HubSpokeDiagram hub={{ label: "Design tokens", sublabel: "Shared source" }} spokes={[{ id: "forms", label: "Forms", side: "left" }, { id: "navigation", label: "Navigation", side: "left" }, { id: "charts", label: "Charts", side: "right" }, { id: "layout", label: "Layout", side: "right" }]} />

With icons

<HubSpokeDiagram
  hub={{ label: "Core", icon: <CpuIcon /> }}
  spokes={[
    { id: "db", label: "Database", icon: <DatabaseIcon />, side: "left" },
    { id: "cache", label: "Cache", icon: <ZapIcon />, side: "right" },
  ]}
  connector="solid"
/>

Props

PropTypeDefaultDescription
hub{ label, icon?, sublabel? }—Central hub node (required)
spokesSpokeNode[]—Array of { id, label, icon?, side } (required)
connector"solid" | "dashed" | "dashed-animated""dashed"Spoke connector style
classNamestring—Additional CSS classes

Plus all standard <div> HTML attributes.