Sections
The DOCX Viewer is for contracts, proposals, reports, and internal docs where visual structure matters more than plain text extraction.
"use client";
import { DocxViewerPreview } from "@/components/ui/docx-viewer";
export function DocxViewerExample() {
return (
<DocxViewerPreview
src="/path/to/document.docx"
defaultThumbnailSidebarOpen={false}
/>Installation
pnpm dlx shadcn@latest add https://ui.extend.ai/r/docx-viewer.json
Useful behaviors
- Preserve headings, lists, tables, images, headers, footers, and page breaks.
- Expose document outline and section anchors.
- Support comments, tracked-change surfaces, and copyable text.
- Provide a predictable fallback state for unsupported Word features.
API Reference
DocxViewerPreview
The DocxViewerPreview component renders a DOCX file with upload, theme, and zoom controls around the @extend-ai/react-docx viewer.
| Prop | Type | Default | Required |
|---|---|---|---|
className | string | - | No |
defaultIsDark | boolean | false | No |
defaultThumbnailSidebarOpen | boolean | true | No |
fileName | string | - | No |
isDark | boolean | - | No |
onIsDarkChange | (isDark: boolean) => void | - | No |
rounded | boolean | false | No |
src | string | - | No |
Deploy your document processing on Extend
Trusted by Brex, Flatiron, Square, and more.
Extend provides production ready tools to handle your toughest documents.
Deploy on Extend