{"id":31755242,"url":"https://github.com/shakibdshy/react-tablegrid","last_synced_at":"2025-10-09T18:41:16.943Z","repository":{"id":269742444,"uuid":"908149952","full_name":"shakibdshy/react-tablegrid","owner":"shakibdshy","description":"A flexible and feature-rich table grid component for React applications with TailwindCSS support.","archived":false,"fork":false,"pushed_at":"2025-02-21T13:26:57.000Z","size":458,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T10:59:40.547Z","etag":null,"topics":["data-grid","data-grid-view","enterpise-table","grid-table","pinned-columns","react-table-component","react-table-grid","sortable-table","tailwind-component","tailwind-table-grid","tailwindcss"],"latest_commit_sha":null,"homepage":"https://react-tablegrid.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shakibdshy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T09:18:25.000Z","updated_at":"2025-02-19T05:01:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf4f210b-d697-4742-bd5c-f0a575036b9f","html_url":"https://github.com/shakibdshy/react-tablegrid","commit_stats":null,"previous_names":["shakibdshy/react-tablegrid"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/shakibdshy/react-tablegrid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibdshy%2Freact-tablegrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibdshy%2Freact-tablegrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibdshy%2Freact-tablegrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibdshy%2Freact-tablegrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakibdshy","download_url":"https://codeload.github.com/shakibdshy/react-tablegrid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakibdshy%2Freact-tablegrid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001895,"owners_count":26083226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-grid","data-grid-view","enterpise-table","grid-table","pinned-columns","react-table-component","react-table-grid","sortable-table","tailwind-component","tailwind-table-grid","tailwindcss"],"created_at":"2025-10-09T18:41:15.791Z","updated_at":"2025-10-09T18:41:16.938Z","avatar_url":"https://github.com/shakibdshy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Table Grid\n\nA powerful and flexible table grid component for React applications with TailwindCSS support. Built with TypeScript and modern React patterns.\n\n[![npm version](https://img.shields.io/npm/v/@shakibdshy/react-tablegrid.svg)](https://www.npmjs.com/package/@shakibdshy/react-tablegrid)\n[![npm downloads](https://img.shields.io/npm/dm/@shakibdshy/react-tablegrid.svg)](https://www.npmjs.com/package/@shakibdshy/react-tablegrid)\n[![License](https://img.shields.io/npm/l/@shakibdshy/react-tablegrid.svg)](https://github.com/shakibdshy/react-tablegrid/blob/main/LICENSE)\n\n## Demo \u0026 Documentation (Updated)\n\n[Demo](https://react-packages-doc.vercel.app/docs/react-tablegrid)\n\n## Installation\n\n```bash\n# Install with npm\nnpm install @shakibdshy/react-tablegrid\n\n# Or with yarn\nyarn add @shakibdshy/react-tablegrid\n\n# Or with pnpm\npnpm add @shakibdshy/react-tablegrid\n```\n\n### Import the CSS styles\n\n ```tsx\n // Method 1: Import styles\n import '@shakibdshy/react-tablegrid/styles';\n\n // OR Method 2: Import CSS file directly\n import '@shakibdshy/react-tablegrid/dist/table-grid.css';\n ```\n\n## Setup\n\n```tsx\n \n/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    // ... your content configuration\n    \"node_modules/@shakibdshy/react-tablegrid/dist/**/*.{js,ts,jsx,tsx}\",\n  ],\n};\n\n```\n\n## Features\n\n- 🔄 Dynamic Sorting \u0026 Server-side Sorting\n- 🔍 Advanced Filtering with Fuzzy Search\n- 📌 Column Pinning (Left/Right)\n- 📏 Column Resizing with Drag \u0026 Drop\n- 👥 Header Groups \u0026 Nested Headers\n- 🎨 Custom Cell \u0026 Header Rendering\n- 🎯 Full TypeScript Support\n- 💅 TailwindCSS Integration\n- 📱 Responsive Design\n- ⚡ Virtualization Support for Large Datasets\n- 🎛️ Customizable Components \u0026 Styling\n- 🎨 Multiple Style Variants\n- 🔄 Column Visibility Toggle\n- 📍 Dynamic Column Pinning\n- 🔄 Row Selection \u0026 Bulk Actions\n- 📊 Row Grouping\n- 🔍 Advanced Search with Multiple Fields\n- 💾 Persistent State Management\n- 🔄 Server-side Pagination\n- 📱 Touch \u0026 Mobile Support\n\n## Basic Usage\n\n```tsx\ntype DataItem = {\n  id: number;\n  name: string;\n  age: number;\n  email: string;\n};\n\nconst columnHelper = createColumnHelper\u003cDataItem\u003e();\n\nconst columns: Column\u003cDataItem\u003e[] = [\n  columnHelper.accessor(\"name\", {\n    header: \"Name\",\n    sortable: false,\n  }),\n  columnHelper.accessor(\"age\", {\n    header: \"Age\",\n    sortable: false,\n  }),\n  columnHelper.accessor(\"email\", {\n    header: \"Email\",\n    sortable: false,\n  }),\n];\n\nconst BasicTable = () =\u003e {\n  return (\n    \u003cdiv className=\"p-4\"\u003e      \n      \u003cTableContainer\n        columns={columns}\n        data={dummyData}\n        maxHeight=\"400px\"\n        variant=\"modern\"\n        onStateChange={(state) =\u003e {\n          console.log(\"Table state changed:\", state);\n        }}\n      /\u003e\n    \u003c/div\u003e\n  );\n};\n\nexport default BasicTable;\n\n```\n\n## API Reference\n\n### TableProps\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `columns` | `Column[]` | Required | Array of column definitions |\n| `data` | `T[]` | Required | Array of data objects |\n| `variant` | `\"modern\" \\| \"minimal\" \\| \"classic\"` | `\"modern\"` | Table style variant |\n| `enableFiltering` | `boolean` | `false` | Enable basic filtering |\n| `enableFuzzySearch` | `boolean` | `false` | Enable fuzzy search |\n| `fuzzySearchKeys` | `Array\u003ckeyof T\u003e` | All columns | Keys to include in fuzzy search |\n| `fuzzySearchThreshold` | `number` | `0.3` | Fuzzy search sensitivity |\n| `maxHeight` | `string` | `\"400px\"` | Maximum height of table |\n| `gridTemplateColumns` | `string` | `\"1fr\"` | CSS grid template columns |\n| `headerGroups` | `boolean` | `false` | Enable header grouping |\n| `isLoading` | `boolean` | `false` | Show loading state |\n| `serverSideConfig` | `ServerSideConfig` | - | Server-side data handling configuration |\n| `virtualizationConfig` | `VirtualizationConfig` | - | Configuration for virtualization |\n| `enableRowSelection` | `boolean` | `false` | Enable row selection |\n| `enableRowGrouping` | `boolean` | `false` | Enable row grouping |\n| `persistState` | `boolean` | `false` | Enable state persistence |\n| `stateKey` | `string` | - | Key for persisting state |\n| `onBulkAction` | `(selectedRows: T[]) =\u003e void` | - | Handler for bulk actions |\n| `touchConfig` | `TouchConfig` | - | Touch interaction configuration |\n\n### Column Definition\n\n```tsx\ninterface Column\u003cT\u003e {\n  id: keyof T;\n  header: ReactNode | (() =\u003e ReactNode);\n  accessorKey: keyof T;\n  sortable?: boolean;\n  className?: string;\n  width?: string;\n  group?: string;\n  pinned?: 'left' | 'right' | false;\n  groupable?: boolean;\n  nestedHeaders?: Column\u003cT\u003e[];\n  cell?: (props: {\n    value: T[keyof T];\n    row: T;\n    onChange?: (value: T[keyof T]) =\u003e void;\n    onDelete?: () =\u003e void;\n  }) =\u003e ReactNode;\n}\n```\n\n### Server-Side Configuration\n\n```tsx\ninterface ServerSideConfig {\n  enabled: boolean;\n  totalRows: number;\n  pageSize: number;\n  onFetch: (params: {\n    page: number;\n    sortBy?: string;\n    sortDirection?: 'asc' | 'desc';\n    filters?: Record\u003cstring, any\u003e;\n  }) =\u003e Promise\u003cT[]\u003e;\n}\n```\n\n### Virtualization Configuration\n\n```tsx\ninterface VirtualizationConfig {\n  enabled: boolean;\n  rowHeight: number;\n  overscan?: number;\n  scrollThreshold?: number;\n}\n```\n\n### Touch Configuration\n\n```tsx\ninterface TouchConfig {\n  enabled: boolean;\n  swipeThreshold?: number;\n  longPressDelay?: number;\n  dragEnabled?: boolean;\n}\n```\n\n### Style Configuration\n\n```tsx\ninterface TableStyleConfig {\n  container?: {\n    className?: string;\n    style?: React.CSSProperties;\n    wrapperClassName?: string;\n    scrollContainerClassName?: string;\n    tableClassName?: string;\n  };\n  header?: {\n    className?: string;\n    style?: React.CSSProperties;\n    headerRowClassName?: string;\n    headerCellClassName?: string;\n    headerGroupClassName?: string;\n  };\n\n  body?: {\n    style?: React.CSSProperties;\n    className?: string;\n    rowClassName?: string;\n    cellClassName?: string;\n  };\n\n  resizer?: {\n    className?: string;\n    style?: React.CSSProperties;\n  };\n\n  resizerIndicator?: {\n    className?: string;\n    style?: React.CSSProperties;\n  };\n\n  sortButton?: {\n    className?: string;\n    style?: React.CSSProperties;\n  };\n\n  utilityStyles?: {\n    emptyClassName?: string;\n    searchContainerClassName?: string;\n    searchInputClassName?: string;\n    loadingClassName?: string;\n    style?: React.CSSProperties;\n  };\n}\n```\n\n### Additional Props\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `columnResizeMode` | `\"onChange\" \\| \"onResize\" \\| \"drag\"` | `\"onChange\"` | When to update column sizes |\n| `onColumnResize` | `(columnId: string, width: number) =\u003e void` | - | Column resize handler |\n| `columnSizing` | `{ columnSizes: { [key: string]: number } }` | - | Column width states |\n| `onColumnPin` | `(columnId: keyof T, position: 'left' \\| 'right' \\| false) =\u003e void` | - | Column pin handler |\n| `onStateChange` | `(state: TableState) =\u003e void` | - | Table state change handler |\n| `onRowSelect` | `(selectedRows: T[]) =\u003e void` | - | Row selection handler |\n| `onGroupChange` | `(groups: string[]) =\u003e void` | - | Row grouping change handler |\n\n## Version History\n\n- v2.1.0 - Enhance table component styling and customization\n  - Added new className and style props for more granular styling control\n  - Introduced rtg-* class names for better semantic targeting\n  - Updated TableStyleConfig to support more detailed styling options\n  - Improved hover and transition effects across table components\n  - Added support for custom row and cell styling in table body\n\n- v2.0.0 - Major Release\n  - Added server-side data handling\n  - Enhanced virtualization for large datasets\n  - Improved column management with drag \u0026 drop\n  - Added row grouping functionality\n  - Enhanced TypeScript support\n  - Added persistent state management\n  - Improved mobile \u0026 touch support\n  - Added bulk actions for selected rows\n  - Enhanced search capabilities\n  - Added nested header groups\n  - Performance optimizations\n- v1.2.0-beta.1 - Added column resizing and toggle column pinning features\n- v1.1.0 - Initial stable release\n- v1.0.0 - Initial release\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT © [Md. Habibur Rahman]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakibdshy%2Freact-tablegrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakibdshy%2Freact-tablegrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakibdshy%2Freact-tablegrid/lists"}