Display spreadsheets in your terminal with ease.
npm install ink-spreadsheet
import React from 'react';
import Spreadsheet, { createColumnHelper } from 'ink-spreadsheet';
interface Person {
name: string;
email: string;
}
const columnHelper = createColumnHelper<Person>();
const columns = [
columnHelper('name', {
header: 'Name',
}),
columnHelper('email', {
header: 'Email',
}),
];
const data = [
{
name: 'John Doe',
email: '[email protected]',
},
{
name: 'Jane Doe',
email: '[email protected]',
},
];
export default function Component() {
return <Spreadsheet columns={columns} data={data} />;
}
This project is licensed under the MIT License - see the LICENSE.md file for details.