ThaddeusJiang / react-table

React Table Component, if you need resize column width, you should use this component.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to @thaddeusjiang/react-table 👋

React Table Component, if you need resize the column, you should use this component.

Version Documentation Maintenance License: MIT Twitter: ThaddeusJiang

features

  • out of box react table component with beautiful style.
  • resize column size of table.
  • automatic animations
  • override cellClassName

🏠 Homepage

Install

yarn add @thaddeusjiang/react-table @tanstack/react-table

Usage

if you don't use Tailwind CSS

import { DataTable } from '@thaddeusjiang/react-table';
import '@thaddeusjiang/react-table/dist/index.css';

<DataTable columns={columns} data={data} sort={['name', 'asc']} />;

if you use Tailwind CSS

import { DataTable } from '@thaddeusjiang/react-table';

<DataTable columns={columns} data={data} sort={['name', 'asc']} />;

modify tailwind.config.js

// tailwind.config.js
+ const path = require("path");

module.exports = {
  content: [
    "./src/**/*{js,ts,jsx,tsx}",
+    path.join(
+      require.resolve("@thaddeusjiang/react-table"),
+      "../**/*.{js,ts,jsx,tsx}"
+    ),
  ],
  theme: {},
  plugins: [],
};

Examples

Author

👤 Thaddeus Jiang

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Thaddeus Jiang.

This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

About

React Table Component, if you need resize column width, you should use this component.

License:MIT License


Languages

Language:TypeScript 82.7%Language:JavaScript 13.7%Language:HTML 3.1%Language:CSS 0.5%