{"id":18348729,"url":"https://github.com/paraboly/react-matrix-table","last_synced_at":"2025-04-09T23:28:47.988Z","repository":{"id":97838364,"uuid":"444952246","full_name":"Paraboly/react-matrix-table","owner":"Paraboly","description":"Simple matrix for react","archived":false,"fork":false,"pushed_at":"2022-01-10T13:59:47.000Z","size":176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-15T14:54:16.659Z","etag":null,"topics":["lightweight","matrix","react","table"],"latest_commit_sha":null,"homepage":"","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/Paraboly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-01-05T21:15:18.000Z","updated_at":"2022-01-12T20:46:58.000Z","dependencies_parsed_at":"2023-03-13T16:08:43.200Z","dependency_job_id":null,"html_url":"https://github.com/Paraboly/react-matrix-table","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-matrix-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-matrix-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-matrix-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paraboly%2Freact-matrix-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paraboly","download_url":"https://codeload.github.com/Paraboly/react-matrix-table/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248128707,"owners_count":21052447,"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","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":["lightweight","matrix","react","table"],"created_at":"2024-11-05T21:18:58.093Z","updated_at":"2025-04-09T23:28:47.951Z","avatar_url":"https://github.com/Paraboly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Matrix Table\n\n\u003e Simple matrix table for react\n\n[![NPM](https://img.shields.io/npm/v/@paraboly/react-matrix-table.svg)](https://www.npmjs.com/package/@paraboly/react-matrix-table)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/paraboly/react-apexcharts-dynamic-config/graphs/commit-activity)\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)\n\n## Demo\n\n![alt text](https://raw.githubusercontent.com/Paraboly/react-matrix-table/main/example/example.png)\n\nCheck example folder\n\n## Install\n\n```bash\nnpm install --save @paraboly/react-matrix-table\n```\n\n## Usage\n\n```tsx\nimport React from 'react';\nimport { scaleLinear } from 'd3-scale';\nimport ReactMatrixTable from '@paraboly/react-matrix-table';\n\nconst opacityScale = scaleLinear()\n  .domain([1, 21])\n  .range([100, 255]);\n\nconst RmtExample = (): React.ReactElement =\u003e {\n  const props = {\n    rows: ['January', 'February', 'March'],\n    columns: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n    data: [\n      [1, 2, 3, 4, 5, 6, 7],\n      [8, 9, 10, 11, 12, 13, 14],\n      [15, 16, 17, 18, 19, 20, 21],\n    ],\n    cellColorFunction: (value: number | string) =\u003e {\n      const opacity = opacityScale(value);\n      const color = `rgba(255, 0, 0, ${opacity / 255})`;\n      return color;\n    },\n  };\n\n  return (\n    \u003cReactMatrixTable\n      rows={props.rows}\n      columns={props.columns}\n      data={props.data}\n      cellColorFunction={props.cellColorFunction}\n    /\u003e\n  );\n};\n\nexport default RmtExample;\n```\n\n## Details\n\n| Props             |                                  Definition                                  |                                  Type |   Default | Required |\n| ----------------- | :--------------------------------------------------------------------------: | ------------------------------------: | --------: | -------: |\n| rows              |                              Matrix row labels                               |                            `string[]` |         - |     true |\n| columns           |                             Matrix column labels                             |                            `string[]` |         - |     true |\n| data              |                            Data for matrix cells                             |              `(string \\| number)[][]` |         - |     true |\n| cellColorFunction | Cell color function which should return color code compatible with css color | `(value: number \\| string) =\u003e string` | undefined |    false |\n| caption           |                         Caption for the matrix table                         |                              `string` |         - |    false |\n\n## License\n\nMIT © [SchemeSonic](https://github.com/SchemeSonic)@[Paraboly](https://www.paraboly.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaboly%2Freact-matrix-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparaboly%2Freact-matrix-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparaboly%2Freact-matrix-table/lists"}