summaryrefslogtreecommitdiffstats
path: root/dev-docs/docs/@excalidraw/excalidraw/api/constants.mdx
diff options
context:
space:
mode:
authorkj_sh6042026-03-15 16:19:35 -0400
committerkj_sh6042026-03-15 16:19:35 -0400
commitbc297e5e496d9f48ef77581b7fb41fdf328a62cf (patch)
tree66192466eef76ee4c5cf71a9788ae9fe947514d4 /dev-docs/docs/@excalidraw/excalidraw/api/constants.mdx
parentf6538b8f1a78a7d72a41916ac79376f8c2d30193 (diff)
refactor: dev-docs/
Diffstat (limited to 'dev-docs/docs/@excalidraw/excalidraw/api/constants.mdx')
-rw-r--r--dev-docs/docs/@excalidraw/excalidraw/api/constants.mdx46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-docs/docs/@excalidraw/excalidraw/api/constants.mdx b/dev-docs/docs/@excalidraw/excalidraw/api/constants.mdx
new file mode 100644
index 0000000..36fbfa7
--- /dev/null
+++ b/dev-docs/docs/@excalidraw/excalidraw/api/constants.mdx
@@ -0,0 +1,46 @@
+# Constants
+
+### FONT_FAMILY
+
+**How to use**
+
+```js
+import { FONT_FAMILY } from "@excalidraw/excalidraw";
+```
+
+`FONT_FAMILY` contains all the font families used in `Excalidraw`. The default families are the following:
+
+| Font Family | Description |
+| ----------- | ---------------------- |
+| `Excalifont` | The `Hand-drawn` font |
+| `Nunito` | The `Normal` Font |
+| `Comic Shanns` | The `Code` Font |
+
+Pre-selected family is `FONT_FAMILY.Excalifont`, unless it's overriden with `initialData.appState.currentItemFontFamily`.
+
+### THEME
+
+**How to use**
+
+```js
+import { THEME } from "@excalidraw/excalidraw";
+```
+
+`THEME` contains all the themes supported by `Excalidraw` as explained below
+
+| Theme | Description |
+| ------- | ----------------- |
+| `LIGHT` | The `light` theme |
+| `DARK` | The `Dark` theme |
+
+Defaults to `THEME.LIGHT` unless passed in `initialData.appState.theme`
+
+### MIME_TYPES
+
+[`MIME_TYPES`](https://github.com/excalidraw/excalidraw/blob/master/packages/excalidraw/constants.ts#L101) contains all the mime types supported by `Excalidraw`.
+
+**How to use **
+
+```js
+import { MIME_TYPES } from "@excalidraw/excalidraw";
+```