DocMosaicdocs
Get started

Installation

Install @docmosaic/react and @docmosaic/core. Bun, npm, pnpm, and yarn all work.

Install

bun add @docmosaic/react @docmosaic/core

@docmosaic/core is a peer dependency of @docmosaic/react - install both.

Peer dependencies

bun add react react-dom react-dnd react-dnd-html5-backend

React 19 is required. Editor.Root mounts a single react-dnd MultiBackend (HTML5 on desktop, touch on mobile) - don't nest another.

Styles

Import the bundled stylesheet once at the root of your app:

import '@docmosaic/react/styles.css';

The stylesheet exposes a --editor-* CSS variable surface. See Theming for how to swap themes (light / dark / brand) and how to override individual tokens.

TypeScript

The packages ship .d.ts files. Both ESM and CJS entry points include matching type bundles.