@superdoc-dev/react: a first-party wrapper with lifecycle management, SSR safety, and React Strict Mode compatibility.
Install
superdoc is included as a dependency: no need to install it separately.Quick start
Core concepts
Document modes
| Mode | Description |
|---|---|
editing | Full editing capabilities |
viewing | Read-only presentation |
suggesting | Track changes mode |
User roles
| Role | Can Edit | Can Suggest | Can View |
|---|---|---|---|
editor | Yes | Yes | Yes |
suggester | No | Yes | Yes |
viewer | No | No | Yes |
Responsive zoom
Passzoom with mode: 'fit-width' to keep the document fitted to its container as it resizes. SuperDoc observes the container for you; no resize listeners needed. Calling setZoom() (or the user picking a percentage in the toolbar) switches back to manual mode.
onViewportChange instead and apply your own zoom with getInstance().setZoom(). See zoom configuration.
Handle file uploads
Next steps
React API Reference
Props, ref API, TypeScript types, and patterns
Custom UI
Build custom toolbar, comments sidebar, and review panel with typed React hooks
Configuration
Full SuperDoc configuration options
Collaboration
Real-time collaboration setup
React Example
React + TypeScript example
Next.js Example
Next.js SSR integration

