W
W
wakenbyWork2022-03-19 15:12:21
JavaScript
wakenbyWork, 2022-03-19 15:12:21

How to draw such svg in react and not only?

There are sections that need to be visually connected with dotted lines, and there are two types of lines:

The first kind of dotted line from section to section

6235c5c42cf8e896631141.png


Second view

6235c879ea927256331196.png


The indents are always different, the line must be drawn dynamically.

Are there libraries for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
goshaLoonny, 2022-03-20
@wakenbyWork

Using an entire library for one line is certainly powerful : )
Use Rete.js if you don't want to bother with one line.
But there is really nothing complicated. You just need to draw the necessary line on the canvas, overlay it on top of your elements and set it to . That's all. pointer-events: none

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question