# react-export-csv

> React Export CSV component

Latest version **0.0.4** (published 2022-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-export-csv
pnpm add react-export-csv
yarn add react-export-csv
bun add react-export-csv
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-06-29 |
| First published | 2021-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 13.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | noah-lnt |
| Maintainers | noah.lnt |

## Links

- npm: https://www.npmjs.com/package/react-export-csv
- Repository: https://github.com/noah-lnt/react-export-csv
- Homepage: https://github.com/noah-lnt/react-export-csv#readme
- Issues: https://github.com/noah-lnt/react-export-csv/issues
- npm.io page: https://npm.io/package/react-export-csv

## Recent versions

- 0.0.4 (latest) — 2022-06-29
- 0.0.3 — 2021-04-23
- 0.0.2 — 2021-02-15
- 0.0.1 — 2021-02-01

## README

# React Export CSV

[![NPM](https://img.shields.io/npm/v/react-export-csv.svg)](https://www.npmjs.com/package/react-export-csv) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

**React Export CSV component for React.**

## Installation

```bash
npm install --save react-export-csv
```

## Documentation

| Props | Type | Default | Details |
|--|--|--|--|
| header | array | null | header for CSV file |
| data | array | null | data row for CSV file |
| separator | string | ; | CSV separator (";" / "," / ...) |
| callback | function | null | callback data |
| isDownload | boolean | false | if auto download file |
| filename | string | "no_name.csv" | file name downloaded file |

## Getting started

### Import Component and style

```js
import { ExportCSV } from 'react-export-csv'
```

### Render Component

```js
<ExportCSV
  header={[
    {
      name: "Col 1",
      key: "col_1"
    },
    {
      name: "Col 2",
      key: "col_2"
    }
  ]}
  data={[
    {
      col_1: "Data 1 col 1",
      col_2: "Data 1 col 2"
    },
    {
      col_1: "Data 2 col 1",
      col_2: "Data 2 col 2"
    }
  ]}
  separator={';'}
  callback={(res) => console.log(res)}
  isDownload={true}
  filename={"test.csv"}
/>
```

## License

MIT © [noah-lnt](https://github.com/noah-lnt)

---
_Source: https://npm.io/package/react-export-csv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
