{"id":13520475,"url":"https://github.com/mxz96102/react-logview","last_synced_at":"2026-05-17T12:09:30.260Z","repository":{"id":135868831,"uuid":"308246012","full_name":"mxz96102/react-logview","owner":"mxz96102","description":"A component display highlight log blazing fast","archived":false,"fork":false,"pushed_at":"2020-10-29T08:21:35.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T08:33:32.479Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mxz96102.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":"2020-10-29T07:09:31.000Z","updated_at":"2021-03-22T04:23:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0b7ad32-3a21-4a13-b420-c47a47e8b880","html_url":"https://github.com/mxz96102/react-logview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mxz96102/react-logview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxz96102%2Freact-logview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxz96102%2Freact-logview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxz96102%2Freact-logview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxz96102%2Freact-logview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxz96102","download_url":"https://codeload.github.com/mxz96102/react-logview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxz96102%2Freact-logview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33137831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-08-01T05:02:21.891Z","updated_at":"2026-05-17T12:09:30.225Z","avatar_url":"https://github.com/mxz96102.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# react-logview\n\n\u003e Using virtual window and lowlight to render logs without innerHTML and fast.\n\n## Install\n\n```bash\nnpm install --save react-logvew\n```\n\n## Get Started\n\n### Basic Usage\n\nYou can use log view easily by import LogView component\n\n```tsx\nimport React from 'react';\nimport { LogView } from 'react-logview';\n\nconst generateRandomLogs = (sum) =\u003e {\n  let i = sum;\n  let str = ''\n  while (sum--) {\n    str += `${Math.random() \u003e 0.5 ? '[WARN]' : '[ERROR]'}: ${Math.random().toString(16).slice(-5).repeat(10)}\\n`\n  }\n  return str\n}\n\nexport default () =\u003e \u003cLogView content={generateRandomLogs(100)} height={120} /\u003e;\n```\n\n### Massive Mount of Logs\n\nEvent with million lines of logs, still not block browser\n\n```tsx\nimport React, {useState} from 'react';\nimport { LogView } from 'react-logview';\n\nconst generateRandomLogs = (sum) =\u003e {\n  let i = sum;\n  let str = ''\n  while (sum--) {\n    str += `${Math.random() \u003e 0.5 ? '[WARN]' : '[ERROR]'}: ${Math.random().toString(16).slice(-5).repeat(10)}\\n`\n  }\n  return str\n}\n\nexport default () =\u003e { \n  const [content, setContent] = useState('Press Load to load');\n  \n  return \u003c\u003e\u003cbutton onClick={() =\u003e setContent(generateRandomLogs(1200000))}\u003eLoad\u003c/button\u003e\u003cLogView revert language=\"prolog\" content={content} height={200}  /\u003e\u003c/\u003e};\n```\n\n### Themes\n\nWe support light(github style) and dark(darcula style) by using theme;\n\n```tsx\nimport React from 'react';\nimport { LogView } from 'react-logview';\n\nconst generateRandomLogs = (sum) =\u003e {\n  let i = sum;\n  let str = ''\n  while (sum--) {\n    str += `${Math.random() \u003e 0.5 ? '[WARN]' : '[ERROR]'}: ${Math.random().toString(16).slice(-5).repeat(10)}\\n`\n  }\n  return str\n}\n\nexport default () =\u003e \u003c\u003e\n  Light Theme\n  \u003cLogView content={generateRandomLogs(100)} height={120} /\u003e\n  Dark Theme\n  \u003cLogView content={generateRandomLogs(100)} height={120} theme=\"dark\" /\u003e\n\u003c/\u003e;\n```\n\n### Keyword Search\n\nBy using keyword props, you can find the lines contains your words.\n\n\n```tsx\nimport React, { useState } from 'react';\nimport { LogView } from 'react-logview';\n\nconst generateRandomLogs = (sum) =\u003e {\n  let i = sum;\n  let str = ''\n  while (sum--) {\n    str += `${Math.random() \u003e 0.5 ? '[WARN]' : '[ERROR]'}: ${Math.random().toString(16).slice(-5).repeat(10)}\\n`\n  }\n  return str\n}\n\nexport default () =\u003e {\n  const [keyword, setKeyword] = useState('ERROR')\n  console.log(keyword)\n\n  return \u003c\u003e\n  \u003cinput value={keyword} onChange={({target: {value}}) =\u003e setKeyword(value)} /\u003e\n  \u003cLogView content={generateRandomLogs(100)} height={120} keywords={keyword} /\u003e\n\u003c/\u003e};\n```\n\n### Props\n\n| Props          | Type              | Description                                             |\n|----------------|-------------------|---------------------------------------------------------|\n| content        | string            | (required) content of logs                              |\n| width          | number            | width                                                   |\n| height         | number            | height                                                  |\n| fontSize       | number            | font size of log                                        |\n| theme          | \"light\" \\| \"dark\" | theme now only support light and dark                   |\n| language       | string            | language of logs default set to prolog                  |\n| focusLine      | number            | on change of focus line, view will scroll to lineNumber |\n| keywords       | string            | filter the line that contains keywords                  |\n| style          | Style             | styles of view                                          |\n| listRef        | MutableRef        | ref of container dom                                    |\n| onScrollBottom | () =\u003e void        | call back on scroll to bottom                           |\n| revert         | boolean           | revert logs rank                                        |\n\n\n## Develop\n\nInstall dependencies,\n\n```bash\n$ npm i\n```\n\nStart the dev server,\n\n```bash\n$ npm start\n```\n\nBuild documentation,\n\n```bash\n$ npm run docs:build\n```\n\nBuild the lib\n\n```bash\n$ npm run build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxz96102%2Freact-logview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxz96102%2Freact-logview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxz96102%2Freact-logview/lists"}