show excalidraw in slidev
---
layout: center
---
<div class="flex flex-col items-center">
# slidev-addon-excalidraw
<Excalidraw
drawFilePath="./example.excalidraw.json"
class="w-[600px]"
:darkMode="false"
:background="false"
/>
</div>
pnpm add slidev-addon-excalidraw
- Define this addon in
frontmatter
addons:
- slidev-addon-excalidraw
- or in
package.json
"slidev": {
"addons": [
"slidev-addon-excalidraw"
]
},
Note
excalidraw file must be in public
, and drawFilePath must be relative to your Public Base Path.
<Excalidraw
drawFilePath="./example.excalidraw.json"
class="w-[600px]"
:darkMode="false"
:background="false"
/>
Name | Type | Default | Description |
---|---|---|---|
drawFilePath |
string |
undefined |
The path to the excalidraw json file. It must be relative to your Public Base Path. |
darkMode |
boolean |
false |
Whether to use dark mode. |
background |
boolean |
false |
Whether to show the background. |