{"id":51201069,"url":"https://github.com/vatesfr/flexi-table","last_synced_at":"2026-06-28T00:30:25.408Z","repository":{"id":365936537,"uuid":"1274201029","full_name":"vatesfr/flexi-table","owner":"vatesfr","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-19T15:19:38.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T15:29:33.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vatesfr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-19T09:20:20.000Z","updated_at":"2026-06-19T15:19:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vatesfr/flexi-table","commit_stats":null,"previous_names":["vatesfr/flexi-table"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/vatesfr/flexi-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatesfr%2Fflexi-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatesfr%2Fflexi-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatesfr%2Fflexi-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatesfr%2Fflexi-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vatesfr","download_url":"https://codeload.github.com/vatesfr/flexi-table/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vatesfr%2Fflexi-table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34873663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"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":[],"created_at":"2026-06-28T00:30:24.767Z","updated_at":"2026-06-28T00:30:25.393Z","avatar_url":"https://github.com/vatesfr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flexi-table\n\n[![CI](https://github.com/vatesfr/flexi-table/actions/workflows/ci.yml/badge.svg)](https://github.com/vatesfr/flexi-table/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@vates/flexi-table-react?label=react)](https://www.npmjs.com/package/@vates/flexi-table-react)\n[![npm](https://img.shields.io/npm/v/@vates/flexi-table-vue?label=vue)](https://www.npmjs.com/package/@vates/flexi-table-vue)\n[![npm](https://img.shields.io/npm/v/@vates/flexi-table-vanilla?label=vanilla)](https://www.npmjs.com/package/@vates/flexi-table-vanilla)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA flexible, fully-typed data table for React, Vue 3, and vanilla JS — with sorting, filtering, column visibility, and row grouping built in.\n\n## Live demo\n\n[React demo](https://vatesfr.github.io/flexi-table/react/) · [Vue demo](https://vatesfr.github.io/flexi-table/vue/) · [Vanilla demo](https://vatesfr.github.io/flexi-table/vanilla/)\n\n## Packages\n\n| Package                                            | Description                        |\n| -------------------------------------------------- | ---------------------------------- |\n| [`@vates/flexi-table-react`](./packages/react)     | React component and hook           |\n| [`@vates/flexi-table-vue`](./packages/vue)         | Vue 3 component and composable     |\n| [`@vates/flexi-table-vanilla`](./packages/vanilla) | Vanilla JS, no framework required  |\n| [`@vates/flexi-table-core`](./packages/core)       | Framework-agnostic logic (pure TS) |\n\n## Features\n\n- Multi-column sort\n- Value checklist filters and numeric range filters\n- Column visibility toggle\n- Row grouping (grouped column hides from the table automatically)\n- Row selection with checkboxes — select all (across pages), group selection, indeterminate state\n- Client-side pagination\n- i18n via a `labels` prop — defaults to English, with built-in locales for FR, ES, DE, PT\n- Custom cell rendering via render props (React), scoped slots (Vue), or `format` string functions (vanilla)\n- Fully typed with TypeScript generics (`TRow extends object`)\n\n## Quick start\n\n### React\n\n```bash\nnpm install @vates/flexi-table-react\n```\n\n```tsx\nimport { DataTable, type ColumnDef } from '@vates/flexi-table-react'\n\ninterface User {\n  id: number\n  name: string\n  role: string\n  salary: number\n}\n\nconst COLUMNS: ColumnDef\u003cUser\u003e[] = [\n  { key: 'name', label: 'Name', type: 'string' },\n  { key: 'role', label: 'Role', type: 'string', groupable: true },\n  {\n    key: 'salary',\n    label: 'Salary',\n    type: 'number',\n    format: (v) =\u003e Number(v).toLocaleString() + ' €',\n  },\n]\n\nexport default function App() {\n  return \u003cDataTable data={users} columns={COLUMNS} rowKey=\"id\" /\u003e\n}\n```\n\nCustom cell rendering with render props:\n\n```tsx\n{ key: 'role', label: 'Role', type: 'string',\n  render: (value, row) =\u003e \u003cBadge label={String(value)} /\u003e,\n  renderFilterLabel: value =\u003e \u003cBadge label={value} /\u003e }\n```\n\n### Vue\n\n```bash\nnpm install @vates/flexi-table-vue\n```\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { DataTable, type ColumnDef } from '@vates/flexi-table-vue'\n\ninterface User {\n  id: number\n  name: string\n  role: string\n  salary: number\n}\n\nconst COLUMNS: ColumnDef\u003cUser\u003e[] = [\n  { key: 'name', label: 'Name', type: 'string' },\n  { key: 'role', label: 'Role', type: 'string', groupable: true },\n  {\n    key: 'salary',\n    label: 'Salary',\n    type: 'number',\n    format: (v) =\u003e Number(v).toLocaleString() + ' €',\n  },\n]\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cDataTable :data=\"users\" :columns=\"COLUMNS\" row-key=\"id\"\u003e\n    \u003ctemplate #cell-role=\"{ value }\"\u003e\n      \u003cBadge :label=\"String(value)\" /\u003e\n    \u003c/template\u003e\n    \u003ctemplate #filter-role=\"{ value }\"\u003e\n      \u003cBadge :label=\"value\" /\u003e\n    \u003c/template\u003e\n    \u003ctemplate #group-role=\"{ value }\"\u003e\n      \u003cBadge :label=\"String(value)\" /\u003e\n    \u003c/template\u003e\n  \u003c/DataTable\u003e\n\u003c/template\u003e\n```\n\n### Vanilla JS\n\n```bash\nnpm install @vates/flexi-table-vanilla\n```\n\n```ts\nimport { createFlexiTable, type ColumnDef } from '@vates/flexi-table-vanilla'\n\nconst COLUMNS: ColumnDef\u003cUser\u003e[] = [\n  { key: 'name', label: 'Name', type: 'string' },\n  { key: 'role', label: 'Role', type: 'string', groupable: true },\n  {\n    key: 'salary',\n    label: 'Salary',\n    type: 'number',\n    format: (v) =\u003e Number(v).toLocaleString() + ' €',\n  },\n]\n\nconst table = createFlexiTable(document.getElementById('table')!, {\n  data: users,\n  columns: COLUMNS,\n  rowKey: 'id',\n})\n\n// Update later\ntable.setData(newUsers)\ntable.destroy()\n```\n\nCSS is injected automatically into `\u003chead\u003e`. Cell output is string-only — use `format` to control rendering.\n\n## i18n\n\nAll UI strings are in English by default. Use a built-in locale or supply any overrides via the `labels` prop:\n\n```tsx\nimport { LABELS_FR } from '@vates/flexi-table-react' // or -vue or -vanilla\n\n\u003cDataTable labels={LABELS_FR} ... /\u003e\n```\n\nBuilt-in locales: `LABELS_EN` (default), `LABELS_FR`, `LABELS_ES`, `LABELS_DE`, `LABELS_PT`.\n\nYou can also pass a `Partial\u003cDataTableLabels\u003e` to override individual strings — it is shallow-merged over the default English labels.\n\n## Theming\n\nAll colors are CSS custom properties (`--color-background-primary`, `--color-text-primary`, etc.). Dark mode activates automatically via `prefers-color-scheme: dark` and can be forced with `data-theme=\"dark\"` or `data-theme=\"light\"` on any ancestor element.\n\n**Vanilla** — tokens and dark-mode rules are injected automatically. No setup required.\n\n**React / Vue** — define the tokens in your own global stylesheet. See the [vanilla README](./packages/vanilla/README.md#theming) for the full token list and default values.\n\n```js\n// Force dark / light / follow OS preference\ndocument.documentElement.dataset.theme = 'dark'\ndocument.documentElement.dataset.theme = 'light'\ndelete document.documentElement.dataset.theme\n```\n\n## Column definition\n\n```ts\ninterface ColumnDefBase\u003cTRow extends object\u003e {\n  key: keyof TRow \u0026 string // must be a key of TRow\n  label: string\n  type?: 'string' | 'number' | 'date' // controls filter UI; default: 'string'\n  width?: number\n  format?: (value: unknown) =\u003e string // plain-string formatter (both adapters)\n  sortable?: boolean // default: true\n  filterable?: boolean // default: true\n  groupable?: boolean // default: false\n}\n```\n\nReact extends this with `render?` and `renderFilterLabel?`. Vue uses scoped slots instead.\n\n## Development\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvatesfr%2Fflexi-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvatesfr%2Fflexi-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvatesfr%2Fflexi-table/lists"}