Socket
Socket
Sign inDemoInstall

react-json-to-csv

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-json-to-csv

A react button component to easily generate csv downloads of your json data.


Version published
Maintainers
1
Created
Source

⌗ react-json-to-csv

A react button component to easily generate csv downloads of your json data. ✨

npm package version  npm downloads  code style: prettier

Live Demo

https://react-json-to-csv.coston.io

Features

  • Create a csv download from json data
  • Lightweight
  • Easy to use
  • optional filename

Install

Install with npm:

npm i react-json-to-csv

Or load from a CDN:

<script src="https://cdn.jsdelivr.net/npm/react-json-to-csv" />

Example Usage

import CsvDownloadButton from 'react-json-to-csv'
...

<CsvDownloadButton data={mockData} />

Props

#PropertyTypeRequirementDefaultDescription
1data[]requiredarray of objects
2filenamestringoptional"export.csv"The filename. The .csv extention will be edded if not included in file name
3delimiterstringoptional";"fields separator
4headersstring[]optionalprovided data object keysList of columns that will be used in the final CSV file.

Typescript Support

Install types with npm

npm i --save-dev @types/react-json-to-csv

Contributing

Please help provide good data faster! Submit any issues and/or make a pull request!

Keywords

FAQs

Package last updated on 11 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc