{"id":13773724,"url":"https://github.com/nitin42/redocx","last_synced_at":"2025-05-15T10:03:22.853Z","repository":{"id":57148350,"uuid":"100776973","full_name":"nitin42/redocx","owner":"nitin42","description":"📄  Create word documents with React","archived":false,"fork":false,"pushed_at":"2020-09-10T07:27:24.000Z","size":395,"stargazers_count":1422,"open_issues_count":13,"forks_count":72,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-14T16:53:58.025Z","etag":null,"topics":["components","library","react","react-fiber","renderer","word-documents"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nitin42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-19T07:08:06.000Z","updated_at":"2025-04-11T06:34:41.000Z","dependencies_parsed_at":"2022-09-05T16:51:31.710Z","dependency_job_id":null,"html_url":"https://github.com/nitin42/redocx","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitin42%2Fredocx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitin42%2Fredocx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitin42%2Fredocx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitin42%2Fredocx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitin42","download_url":"https://codeload.github.com/nitin42/redocx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310518,"owners_count":22049470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["components","library","react","react-fiber","renderer","word-documents"],"created_at":"2024-08-03T17:01:19.445Z","updated_at":"2025-05-15T10:03:17.769Z","avatar_url":"https://github.com/nitin42.png","language":"JavaScript","readme":"# redocx\n[![Build Status](https://travis-ci.org/nitin42/redocx.svg?branch=master)](https://travis-ci.org/nitin42/redocx)\n![yarn](https://img.shields.io/badge/yarn-0.21.3-blue.svg)\n![license](https://img.shields.io/packagist/l/doctrine/orm.svg)\n![status](https://img.shields.io/badge/status-stable-brightgreen.svg)\n\n\u003e Create word documents with React\n\n\u003cp align='center'\u003e\n  \u003cimg src='./redocx.png' width='450' height='180' /\u003e\n\u003c/p\u003e\n\n## Introduction\n\n`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. \n\n#### Example \n\nA simple component that renders a \"Hello World\" text to a word document.\n\n```js\nimport React from 'react'\nimport { render, Document, Text } from 'redocx'\n\nclass App extends React.Component {\n  render() {\n    return (\n      \u003cDocument\u003e\n        \u003cText\u003eHello World\u003c/Text\u003e\n      \u003c/Document\u003e\n    )\n  }\n}\n\nrender(\u003cApp /\u003e, `${__dirname}/example.docx`)\n```\n\nLet's get started!\n\n\n## Install\n\n**Babel presets and cli**\n\n```\nnpm install --save-dev babel-cli babel-core babel-preset-env babel-preset-react babel-preset-stage-0\n```\n\n**react and redocx**\n\n```\nnpm install --save react redocx\n```\n\n## Usage\n\n* Create a `.babelrc`\n\n```\n{\n  \"presets\": [\n    \"env\",\n    \"stage-0\",\n    \"react\"\n  ]\n}\n```\n\n* After configuring babel and assuming you've already created a file `example.js` with [this](#example) example, run `babel-node example.js`. This will render your React component to word document.\n\n\n## Demo\n\n```\ngit clone https://github.com/nitin42/redocx.git\ncd redocx\nnpm install\nnpm run example\n```\n\n## Documentation\n\nSee the detailed documentation [here](./docs)\n\n## Contributing\n\n[Contributing guide](https://github.com/nitin42/redocx/blob/master/CONTRIBUTING.md)\n\n## License\n\nMIT\n\n[![Sponsor](https://app.codesponsor.io/embed/FCRW65HPiwhNtebDx2tTc53E/nitin42/redocx.svg)](https://app.codesponsor.io/link/FCRW65HPiwhNtebDx2tTc53E/nitin42/redocx)\n\n","funding_links":[],"categories":["JavaScript","File"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitin42%2Fredocx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitin42%2Fredocx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitin42%2Fredocx/lists"}