@vivek_rajotia/react-base-table
v1.0.1
Published
A comprehensive React table component built with Mantine UI and TanStack Table
Downloads
8
Maintainers
Readme
Mantine React Table
A comprehensive React table component built with Mantine UI and TanStack Table, providing a powerful and customizable data table solution.
Features
- 🎨 Mantine UI Integration - Built on top of Mantine UI components
- 📊 TanStack Table - Powered by the most flexible table library
- 🔧 Highly Customizable - Extensive customization options
- 📱 Responsive - Mobile-friendly design
- ♿ Accessible - WCAG compliant components
- 🚀 Performance - Virtual scrolling and optimized rendering
- 🎯 TypeScript Support - Full TypeScript support (converted to JSX)
Installation
npm install @your-username/mantine-react-table
# or
yarn add @your-username/mantine-react-table
# or
pnpm add @your-username/mantine-react-tablePeer Dependencies
This package requires the following peer dependencies:
{
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"@mantine/core": ">=7.0.0",
"@mantine/hooks": ">=7.0.0",
"@tanstack/react-table": ">=8.0.0"
}Quick Start
import React from 'react';
import { MantineProvider } from '@mantine/core';
import { MantineReactTable } from '@your-username/mantine-react-table';
const data = [
{ id: 1, name: 'John Doe', email: '[email protected]', age: 30 },
{ id: 2, name: 'Jane Smith', email: '[email protected]', age: 25 },
// ... more data
];
const columns = [
{ accessorKey: 'name', header: 'Name' },
{ accessorKey: 'email', header: 'Email' },
{ accessorKey: 'age', header: 'Age' },
];
function App() {
return (
<MantineProvider>
<MantineReactTable
columns={columns}
data={data}
enableColumnFiltering
enableSorting
enablePagination
/>
</MantineProvider>
);
}
export default App;Available Components
Core Components
MantineReactTable- Main table componentMRT_Table- Base table componentMRT_TableContainer- Table container wrapperMRT_TablePaper- Paper wrapper for table
Body Components
MRT_TableBody- Table body componentMRT_TableBodyCell- Individual cell componentMRT_TableBodyRow- Table row componentMRT_TableBodyEmptyRow- Empty state rowMRT_TableDetailPanel- Expandable detail panel
Header Components
MRT_TableHead- Table header componentMRT_TableHeadCell- Header cell componentMRT_TableHeadRow- Header row component
Footer Components
MRT_TableFooter- Table footer componentMRT_TableFooterCell- Footer cell componentMRT_TableFooterRow- Footer row component
Toolbar Components
MRT_TopToolbar- Top toolbar with actionsMRT_BottomToolbar- Bottom toolbar with paginationMRT_TablePagination- Pagination component
Button Components
MRT_CopyButton- Copy data buttonMRT_ExpandButton- Row expansion buttonMRT_ToggleFiltersButton- Filter toggle buttonMRT_ToggleFullScreenButton- Full screen toggle- And many more...
Input Components
MRT_FilterTextInput- Text filter inputMRT_FilterCheckbox- Checkbox filterMRT_GlobalFilterTextInput- Global search inputMRT_EditCellTextInput- Inline editing input
Hooks
useMantineReactTable- Main hook for table functionalityuseMRT_TableInstance- Table instance hookuseMRT_TableOptions- Table options hookuseMRT_Effects- Effects hookuseMRT_Rows- Rows management hook
Utilities
aggregationFns- Aggregation functionsfilterFns- Filter functionssortingFns- Sorting functionscolumn.utils- Column utilitiesrow.utils- Row utilitiesstyle.utils- Styling utilities
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have questions, please:
- Check the issues page
- Create a new issue with detailed information
- Include code examples and error messages
Changelog
1.0.0
- Initial release
- Complete Mantine React Table component library
- Converted from TypeScript to JSX for broader compatibility
- Comprehensive set of table components and utilities
