@baneung-pack

커스텀 엣지

커스텀 edge — `edgeTypes` prop에 path 함수 등록 ({sourceX, sourceY, targetX, targetY, ...} → SVG path d). 여기선 wavy(사인파)와 arc(반원) 두 가지 사용자 정의.

arcwavybezier (기본)smoothstepABCD

API

FlowChartProps

PropertyType기본값설명
nodesFlowNode[]필수노드 배열. 각 노드: { id, label?, x, y, width?, height?, fill?, stroke?, textColor? }
edgesFlowEdge[]필수엣지 배열. { source, target, type?, label?, color?, animated?, dashed?, arrow?, sourcePosition?, targetPosition? }
edgeTypesRecord<string, FlowEdgePathFn>{}사용자 정의 edge path. (sourceX, sourceY, targetX, targetY, ...) → SVG path d 문자열 반환
heightnumber400SVG 캔버스 높이(px)
pannablebooleantrue마우스 드래그로 캔버스 pan 가능 여부
showGridbooleantrue배경 dot grid 표시
classNamestring-외부 wrapper className
emptyStateReactNode-nodes가 비어있을 때 표시