
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
@simuratli/react-json-csv-converter
Advanced tools
A lightweight and customizable React component that enables users to download JSON data as a CSV file with a single button click.
className
, disabled
, etc.) for customization.npm install @simuratli/react-json-csv-converter
or
yarn add @simuratli/react-json-csv-converter
import { JsonToCsvDownload } from '@simuratli/react-json-csv-converter';
const data = [
{ id: 1, name: 'Alice', age: 30 },
{ id: 2, name: 'Bob', age: 25 }
];
<JsonToCsvDownload data={data} filename="users.csv">
Export Users
</JsonToCsvDownload>;
import { JsonToCsvDownload } from '@simuratli/react-json-csv-converter';
const data = [
{ id: 1, name: 'Alice', age: 30 },
{ id: 2, name: 'Bob', age: 25 }
];
const headers = [
{ label: 'User ID', key: 'id' },
{ label: 'Full Name', key: 'name' },
{ label: 'User Age', key: 'age' }
];
<JsonToCsvDownload
data={data}
headers={headers}
filename="custom_users.csv"
className="my-custom-button"
>
Download CSV
</JsonToCsvDownload>;
Prop | Type | Description |
---|---|---|
data | object[] | Required. The JSON array to convert and download as CSV. |
headers | { label: string, key: string }[] | null | Optional. Custom headers for CSV: display label and extract from key . |
filename | string | Optional. Name of the downloaded CSV file. Default is data.csv . |
className | string | Optional. Custom CSS classes for the button. |
children | ReactNode | Optional. Button label/content. Default is "Download CSV" . |
onDownload | () => void | Optional. Callback after successful CSV download. |
...props | ButtonHTMLAttributes<HTMLButtonElement> | Optional. All standard <button> props supported. |
npm run dev
MIT © Your Name or GitHub Handle
FAQs
React json to csv converter
The npm package @simuratli/react-json-csv-converter receives a total of 74 weekly downloads. As such, @simuratli/react-json-csv-converter popularity was classified as not popular.
We found that @simuratli/react-json-csv-converter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.