Excalidraw as a React component
npm install @dwelle/excalidrawExcalidraw is exported as a component to be directly embedded in your project.
Use npm or yarn to install the package.
``bash`
npm install react react-dom @excalidraw/excalidrawor
yarn add react react-dom @excalidraw/excalidraw
> Note: If you don't want to wait for the next stable release and try out the unreleased changes, use @excalidraw/excalidraw@next.
#### Self-hosting fonts
By default, Excalidraw will try to download all the used fonts from the CDN.
For self-hosting purposes, you'll have to copy the content of the folder node_modules/@excalidraw/excalidraw/dist/prod/fonts to the path where your assets should be served from (i.e. public/ directory in your project). In that case, you should also set window.EXCALIDRAW_ASSET_PATH to the very same path, i.e. / in case it's in the root:
`js`
Excalidraw takes _100%_ of width and height` of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.
Go to CodeSandbox example.
Head over to the docs.
Head over to the docs.
Head over to the docs.