Skip to main content
@superdoc-dev/react is a first-party React wrapper for SuperDoc. It handles lifecycle management, SSR safety, and React Strict Mode compatibility so you can drop a DOCX editor into any React app. Building your own toolbar, comments sidebar, or review panel? Pair <SuperDocEditor> with superdoc/ui/react. See Custom UI.

Installation

superdoc is included as a dependency: no need to install it separately.

Quick start

What the component handles

  • Mounting: Creates a SuperDoc instance when the component mounts
  • Updates: Rebuilds automatically when the document prop changes
  • Cleanup: Destroys the instance on unmount
  • SSR: Renders container structure on server, initializes SuperDoc after hydration
  • Strict Mode: Internal cleanup flag prevents issues from React 18 double-invocation

Requirements

API structure

  • Configuration: All props reference
  • Methods: Ref API, instance methods, and patterns
  • Types: TypeScript types, framework integration, troubleshooting