You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.6 KiB
Markdown
50 lines
1.6 KiB
Markdown
2 years ago
|
# Excalidraw
|
||
3 years ago
|
|
||
2 years ago
|
**Excalidraw** is exported as a component to directly embed in your projects.
|
||
4 years ago
|
|
||
2 years ago
|
## Installation
|
||
4 years ago
|
|
||
2 years ago
|
You can use `npm`
|
||
4 years ago
|
|
||
2 years ago
|
```bash
|
||
4 years ago
|
npm install react react-dom @excalidraw/excalidraw
|
||
|
```
|
||
|
|
||
2 years ago
|
or via `yarn`
|
||
4 years ago
|
|
||
2 years ago
|
```bash
|
||
4 years ago
|
yarn add react react-dom @excalidraw/excalidraw
|
||
|
```
|
||
|
|
||
4 years ago
|
After installation you will see a folder `excalidraw-assets` and `excalidraw-assets-dev` in `dist` directory which contains the assets needed for this app in prod and dev mode respectively.
|
||
4 years ago
|
|
||
4 years ago
|
Move the folder `excalidraw-assets` and `excalidraw-assets-dev` to the path where your assets are served.
|
||
4 years ago
|
|
||
2 years ago
|
By default it will try to load the files from [`https://unpkg.com/@excalidraw/excalidraw/dist/`](https://unpkg.com/@excalidraw/excalidraw/dist)
|
||
4 years ago
|
|
||
4 years ago
|
If you want to load assets from a different path you can set a variable `window.EXCALIDRAW_ASSET_PATH` depending on environment (for example if you have different URL's for dev and prod) to the url from where you want to load the assets.
|
||
4 years ago
|
|
||
4 years ago
|
#### Note
|
||
|
|
||
3 years ago
|
**If you don't want to wait for the next stable release and try out the unreleased changes you can use `@excalidraw/excalidraw@next`.**
|
||
4 years ago
|
|
||
2 years ago
|
## Dimensions of Excalidraw
|
||
2 years ago
|
|
||
2 years ago
|
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.
|
||
2 years ago
|
|
||
2 years ago
|
### Demo
|
||
4 years ago
|
|
||
2 years ago
|
[Try here](https://codesandbox.io/s/excalidraw-ehlz3).
|
||
4 years ago
|
|
||
2 years ago
|
## Integration
|
||
4 years ago
|
|
||
2 years ago
|
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration)
|
||
3 years ago
|
|
||
2 years ago
|
## API
|
||
3 years ago
|
|
||
2 years ago
|
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api)
|
||
2 years ago
|
|
||
|
## Contributing
|
||
|
|
||
|
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/contributing)
|