blockcn

Introduction

A Notion-style block editor for shadcn/ui that you install as source code.

blockcn is a Notion-style block editor for shadcn/ui, built on Tiptap. It installs like a shadcn component: one command copies the source into your project, and from then on it is your code.

Why blockcn

  • You own the code. Files land in src/components/editor and src/editor-core. No black-box SDK and no runtime license. blockcn is MIT licensed.
  • Matches your theme. The editor reads your shadcn CSS variables in light and dark mode.
  • Doesn't touch your UI kit. The editor brings its own primitives under components/editor/ui, so your components/ui is left alone.
  • Modular. Start with the core editor. Add tables, Ask AI or collaboration when you need them.

What you can install

Registry itemWhat you getGuide
editor-shellThe editor: text blocks (including callouts, toggles and highlighted code), slash menu, drag handle, formatting toolbar, outline.Basic editor
export-menuHTML, Markdown, and Word import and export, plus paste and PDF through the print dialog. Import shows a report first. Place <ExportMenu /> inside Editor.Blocks and export
media-blocksImage, video, audio, file, and link blocks.Blocks and export
excalidraw-blockAn Excalidraw whiteboard block.Blocks and export
table-toolbarTables with a row and column toolbar.Blocks and export
mathKaTeX inline math and math blocks.Blocks and export
columnsNotion-style 2–5 column layouts, made by dropping a block beside another.Blocks and export
mentions@ mentions and a : emoji list.Blocks and export
tocA table-of-contents block.Blocks and export
link-previewA paste menu that turns a URL into a link, a mention chip, a bookmark, or an embed.Blocks and export
pagesPage mentions and page links. The app owns the page tree and routing.Blocks and export
ai-menuThe Ask AI panel. It is a client; you point it at your own streaming endpoint.Ask AI
collaborationReal-time editing over Yjs, with presence avatars and remote carets.Collaboration

Requirements

  • React 18.3 or 19, on Next.js (App Router or Pages Router), Vite, or React Router. See Supported stack.
  • Tailwind CSS v4
  • A src/ directory with the @/* path alias (shadcn init sets this up)

Keyboard basics

ActionHow
Insert a blockType / on an empty line
Format textSelect text to open the toolbar
Move a blockDrag the handle to the left of the block
Undo / redoCtrl/⌘ + Z / Ctrl/⌘ + Shift + Z

On this page