@bloklabs/vue

Vue block editor — official Vue 3 bindings for Blok, the headless Notion-like rich text editor. Composables and components that render blocks and save to JSON.
5,341 43
Install
npm install @bloklabs/vue
Latest Version:1.16.1
Vue:3
License:Apache-2.0
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: jackuait

@bloklabs/vue

The Vue 3 block editor bindings for Blok. Blok is a headless, Notion-like rich text editor whose content is JSON blocks, not HTML.

Install

npm install @bloklabs/vue @bloklabs/core

@bloklabs/core and vue are peer dependencies.

Usage

<BlokEditor> is the all-in-one component: it mounts the editor, manages its lifecycle, and takes every editor config option as a prop.

<script setup lang="ts">
import { BlokEditor } from '@bloklabs/vue';
import { Header, Paragraph, List } from '@bloklabs/core/tools';

const tools = {
  paragraph: Paragraph,
  header: { class: Header, placeholder: 'Enter a heading' },
  list: List,
};
</script>

<template>
  <BlokEditor :tools="tools" />
</template>

Saving

The save emit fires with the latest content on every change, so you never have to call save() by hand.

<script setup lang="ts">
import { ref } from 'vue';
import { BlokEditor } from '@bloklabs/vue';
import type { OutputData } from '@bloklabs/core';

const data = ref<OutputData>();
</script>

<template>
  <BlokEditor @save="(d: OutputData) => (data = d)" />
  <pre>{{ data?.blocks }}</pre>
</template>

Also exported

  • useBlok(config, recreateKey?) — the composable behind the component. Returns a Ref<Blok | null>.
  • BlokContent — the mount-point element, if you want to wire the composable yourself.
  • useBlocks(editor) — a reactive snapshot of the block tree plus a manipulation API.
  • createVueBlock — author block tools as Vue components.
  • provideBlok / useBlokDefaults — share default editor config through provide/inject.

Docs

Licensed under Apache-2.0.

Related Packages

@bloklabs/core

Blok — headless, highly extensible rich text editor built for developers who nee...

9,498 43
@richkitjs/vue

Vue 3 bindings for RichKit: useEditor composable, EditorContent component and pr...

484 0
@xproeditor/vue

Notion-like block editor for Vue 3 — supports a sticky format toolbar and/or a f...

1,516 1
feather-editor-vue

A lightweight, zero-dependency rich text editor with clean Feather icons. Framew...

811
@sqwig/vue

Vue 3 component for Sqwig — the text box with spellcheck built in. Client-side d...

0

Version History

Version Released Vue License
1.16.1 ^3.5.0 Apache-2.0
1.16.0 ^3.5.0 Apache-2.0
1.15.2 ^3.5.0 Apache-2.0
1.15.1 ^3.5.0 Apache-2.0
1.15.0 ^3.5.0 Apache-2.0