This is the only examples catalog for SuperDoc. Each child directory is a small, complete project that can be copied out of the repository and run on its own.
Every example is typechecked and has a behavior test for the outcome its README promises. Browser examples are also built before their behavior test runs.
- Vanilla TypeScript quickstart — open a DOCX, edit it, and export the result.
- React quickstart — own the editor lifecycle from a React component.
- Bounded SDK batches — limit active documents, reuse hosts for finite batches, and retain failed work for recovery.
- Document comparison — compare two DOCX files and apply the result as a reviewable tracked change.
- Version history — save and restore browser-owned DOCX snapshots.
- Collaborative version history — save versions of a shared room on a schedule or on request, compare two as tracked changes, and restore one into the live room.
- Custom UI — format a document from an application-owned control.
- Content controls — add fields to a DOCX template or fill them from application data.
- Document modes — switch between viewing, editing, and suggesting.
- Search — enable the built-in find surface and navigate matches.
- Proofing — add local spell checking with suggestions and Ignore.
- Collaboration — synchronize one DOCX between two browser pages.
- Collaboration server — run a Hocuspocus server that checks access, keeps rooms across restarts, autosaves each room as DOCX, and adds a backend agent that suggests tracked changes to browser editors.
Inside this repository, examples use the workspace packages instead of the published ones. Build them before you run pnpm dev or pnpm test in an example:
pnpm install
pnpm build:superdoc
pnpm --filter @superdoc/react run build # React example onlyA copied example installs its superdoc version from npm and needs neither build.