Custom Edges
Svelvet also allows you to
customize your edges. Currently, there are four edge types - straight, bezier,
step, and smoothstep. The default will be a bezier edge unless you set
type: 'straight',
'step', or
'smoothstep'. You can also
turn on edge animations by setting
animation: true.
Optionally customize the color of edges by setting
edgeColor
to a color name, hexcode, or rgb value. Annotate your edges by providing a
label. Customize labels with
labelBgColor
and labelTextColor to change the
background and text color of the label using color names, hexcodes, or rgb values.
Edge Properties
- keyvalue
id(required) stringsource(required) node idtarget(required) node idtypestring ("straight", "bezier", "step", "smoothstep") - defaults to "bezier" if not specifiedlabelstringlabelBgColorstring of string of color name, hexcode, or rgblabelTextColorstring of color name, hexcode, or rgbedgeColorstring of color name, hexcode, or rgbanimatebooleanarrowbooleannoHandleboolean
Implementing Custom Edges
Click here for a sandbox!