# artree-react-csv-creator

> react-csv-creator --- A react component for downloading data into a csv file.

Latest version **1.1.0** (published 2022-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install artree-react-csv-creator
pnpm add artree-react-csv-creator
yarn add artree-react-csv-creator
bun add artree-react-csv-creator
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-05-17 |
| First published | 2022-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Romello Goodman |
| Maintainers | sexydynamite |

## Links

- npm: https://www.npmjs.com/package/artree-react-csv-creator
- Repository: https://github.com/romellogood/react-csv-creator
- Homepage: https://github.com/romellogood/react-csv-creator#readme
- Issues: https://github.com/romellogood/react-csv-creator/issues
- npm.io page: https://npm.io/package/artree-react-csv-creator

## Recent versions

- 1.1.0 (latest) — 2022-05-17

## README

react-csv-creator
---
A react component for downloading data into a csv file.

[![npm](https://img.shields.io/npm/v/react-csv-creator.svg)](https://www.npmjs.com/package/react-csv-creator)

Development utilizes [storybook](https://getstorybook.io/) and based on [react-storybook-boilerplate](https://github.com/romellogood/react-storybook-boilerplate).

### running
```
$ npm i
$ npm start
```

### packaging
```
$ npm run build
$ npm publish
```

### props
| Name     | Type         | Default      | Required | Description                                                   |
|:---------|:-------------|:-------------|:---------|:--------------------------------------------------------------|
| disabled | bool         | false        | false    | Disable the downloading of the csv                            |
| headers  | array object | null         | false    | Header's names                                                |
| filename | string       | current time | false    | The filename without extension. Defaults to current date/time |
| noHeader | bool         | false        | false    | If true, will omit the header from the file                   |
| rows     | array object | null         | true     | The main data for the csv                                     |
| text     | string       | null         | false    | The text to use if no children component                      |


### Usage
```
import CsvCreator from 'react-csv-creator';

const headers = [{
  id: 'first',
  display: 'First column'
}, {
  id: 'second',
  display: 'Second column'
}];

const rows = [{
  first: 'foo',
  second: 'bar'
}, {
  first: 'foobar',
  second: 'foobar'
}];

<CsvCreator
  filename='my_cool_csv'
  headers={headers}
  rows={rows}
>
  <p>Download CSV</p>
</CsvCreator>
```

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