Typed document data
Each block has an ID, type, schema version, and JSON data. Register a validator alongside your component.
React / TypeScript / MIT
Turn React components into editable blocks. Get document state, undo and redo, and a separate renderer. Keep control of the interface and storage.
Typed blocks. Your design.
pnpm add @headless-widgets/react @headless-widgets/editorTry it
Edit the fields. Watch the rendered output update.
What it handles
Each block has an ID, type, schema version, and JSON data. Register a validator alongside your component.
Insert, reorder, copy, and remove blocks. Undo and redo are part of the editor state.
Receive set, remove, and order patches. Connect those events to your application's storage.
Render the same document on published pages. Keep editing dependencies on the authoring route.
Where it fits
Use it for a CMS, a documentation tool, or an editor embedded in your product. Add rich text only where a block needs it.
Your components, CSS, persistence, permissions, and publishing workflow. This toolkit supplies the document and editing layer.
Explore example documentsPre-1.0 software. APIs and schemas may change.