Skip to content
πŸ“„ Create word documents with React
Branch: master
Clone or download

Latest commit

Nitin Tulswani Nitin Tulswani
Nitin Tulswani and Nitin Tulswani v1.1.4
Latest commit 384305b Dec 7, 2018


Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__ updated Nov 9, 2017
demo v1.1.4 Dec 7, 2018
docs Added docs Oct 4, 2018
examples updated Nov 9, 2017
src Adding ability to render straight to memory mapped stream Oct 1, 2018
.babelrc Fix indentation issue for babelrc Dec 5, 2018
.eslintrc.js disable no console Aug 19, 2017
.gitignore chore(git): the generated demo file should be ignored Aug 21, 2017
.travis.yml node 6 Aug 19, 2017 use word.js Aug 20, 2017 updated Sep 1, 2017
package.json v1.1.4 Dec 7, 2018
redocx.png [ImgBot] optimizes images Sep 2, 2017
yarn.lock v1.1.4 Dec 7, 2018


Build Status yarn license status

Create word documents with React


redocx is a library which lets you create word documents with React. It provides a set of components which renders your declarative views and components to word documents.


A simple component that renders a "Hello World" text to a word document.

import React from 'react'
import { render, Document, Text } from 'redocx'

class App extends React.Component {
  render() {
    return (
        <Text>Hello World</Text>

render(<App />, `${__dirname}/example.docx`)

Let's get started!


Babel presets and cli

npm install --save-dev babel-cli babel-core babel-preset-env babel-preset-react babel-preset-stage-0

react and redocx

npm install --save react redocx


  • Create a .babelrc
  "presets": [
  • After configuring babel and assuming you've already created a file example.js with this example, run babel-node example.js. This will render your React component to word document.


git clone
cd redocx
npm install
npm run example


See the detailed documentation here


Contributing guide




You can’t perform that action at this time.