sigilUI

Hub Route Diagram

Connect multiple routes through a central hub.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

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

Usage

<HubRouteDiagram source={{ label: "Application" }} hub={{ label: "Gateway", layers: [{ label: "Authenticate" }, { label: "Route" }, { label: "Observe" }] }} leftTargets={[{ label: "Database" }, { label: "Storage" }]} rightTargets={[{ label: "Search" }, { label: "Events" }]} />

Props

PropTypeDefaultDescription
source (required){ label: string; icon?: ReactNode }—Source configuration.
hub (required){ label: string; layers: HubRouteLayer[] }—Hub configuration.
leftTargets (required)HubRouteNode[]—Left Targets configuration.
rightTargets (required)HubRouteNode[]—Right Targets configuration.
leftLabelstring—Left Label configuration.
rightLabelstring—Right Label configuration.

Token integration

CSS VariablePurpose
--s-radius-cardRadius card
--s-borderBorder
--s-surfaceSurface
--s-border-mutedBorder muted
--s-radius-mdRadius md
--s-backgroundBackground
--s-textText
--s-border-strongBorder strong
--s-radius-lgRadius lg
--s-primaryPrimary
--s-primary-mutedPrimary muted
--s-font-monoFont mono