aboutsummaryrefslogtreecommitdiffstats
path: root/packages/excalidraw/README.md
diff options
context:
space:
mode:
authorkj_sh6042026-03-15 16:19:35 -0400
committerkj_sh6042026-03-15 16:19:35 -0400
commit6ec259a0e71174651bae95d4628138bf6fd68742 (patch)
tree5e33c6a5ec091ecabfcb257fdc7b6a88ed8754ac /packages/excalidraw/README.md
parent16c8578b15c727f22921f8a80a56ee4d4e7f2272 (diff)
refactor: packages/
Diffstat (limited to 'packages/excalidraw/README.md')
-rw-r--r--packages/excalidraw/README.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/packages/excalidraw/README.md b/packages/excalidraw/README.md
new file mode 100644
index 0000000..5185185
--- /dev/null
+++ b/packages/excalidraw/README.md
@@ -0,0 +1,45 @@
+# Excalidraw
+
+**Excalidraw** is exported as a component to be directly embedded in your project.
+
+## Installation
+
+Use `npm` or `yarn` to install the package.
+
+```bash
+npm install react react-dom @excalidraw/excalidraw
+# or
+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](https://esm.run/@excalidraw/excalidraw/dist/prod).
+
+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
+<script>window.EXCALIDRAW_ASSET_PATH = "/";</script>
+```
+
+### Dimensions of Excalidraw
+
+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.
+
+## Demo
+
+Go to [CodeSandbox](https://codesandbox.io/p/sandbox/github/excalidraw/excalidraw/tree/master/examples/with-script-in-browser) example.
+
+## Integration
+
+Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration).
+
+## API
+
+Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api).
+
+## Contributing
+
+Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/contributing).