2.`@open-pencil/vue` — Vue composables and headless primitives
3. your app — styling, routing, file flows, product-specific UI
## Minimal setup
### 1. Create an editor
```ts
import { createEditor } from '@open-pencil/core/editor'
const editor = createEditor({
width: 1200,
height: 800,
})
```
### 2. Provide it to Vue
```vue
<scriptsetuplang="ts">
import { provideEditor } from '@open-pencil/vue'
import type { Editor } from '@open-pencil/core/editor'
const props = defineProps<{
editor: Editor
}>()
provideEditor(props.editor)
</script>
<template>
<slot/>
</template>
```
You can think of this as the provider layer for the editor tree. The docs prefer `provideEditor()` directly because that is the current real API surface.
### 3. Attach a canvas
```vue
<scriptsetuplang="ts">
import { ref } from 'vue'
import { useCanvas, useEditor } from '@open-pencil/vue'