How to use js library(that contains canvas tag, getElementById)into reactjs?

I am using this js library in my portfolio in vanilla js and it was working properly:

(https://

codepen.io/drweb/pen/eYNvyEa

)

But now i am creating a react project and i want to use that library, but i don’t really know how to use it, and don’t know if it was possible..

Please help me