{"id":15020807,"url":"https://github.com/kochiyaocean/electron-react-titlebar","last_synced_at":"2025-07-22T20:32:53.663Z","repository":{"id":37952953,"uuid":"93327599","full_name":"KochiyaOcean/electron-react-titlebar","owner":"KochiyaOcean","description":"A github desktop style title bar component for electron.","archived":false,"fork":false,"pushed_at":"2023-03-15T02:12:29.000Z","size":1844,"stargazers_count":62,"open_issues_count":8,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-02T21:50:12.876Z","etag":null,"topics":["electron","react","react-virtualized","titlebar"],"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/KochiyaOcean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-06-04T16:50:20.000Z","updated_at":"2025-01-23T15:31:51.000Z","dependencies_parsed_at":"2024-06-18T21:34:48.909Z","dependency_job_id":"144307e5-9482-4b21-9c94-220a236f460a","html_url":"https://github.com/KochiyaOcean/electron-react-titlebar","commit_stats":{"total_commits":73,"total_committers":7,"mean_commits":"10.428571428571429","dds":0.2191780821917808,"last_synced_commit":"ff2ec4876ee0bc0cd6a20f3451441dc2a2a4f177"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KochiyaOcean/electron-react-titlebar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochiyaOcean%2Felectron-react-titlebar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochiyaOcean%2Felectron-react-titlebar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochiyaOcean%2Felectron-react-titlebar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochiyaOcean%2Felectron-react-titlebar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KochiyaOcean","download_url":"https://codeload.github.com/KochiyaOcean/electron-react-titlebar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KochiyaOcean%2Felectron-react-titlebar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567555,"owners_count":23949379,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["electron","react","react-virtualized","titlebar"],"created_at":"2024-09-24T19:55:40.389Z","updated_at":"2025-07-22T20:32:53.577Z","avatar_url":"https://github.com/KochiyaOcean.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-react-titlebar\nA github desktop style title bar component for electron.\n\n![screenshot](https://github.com/KochiyaOcean/electron-react-titlebar/raw/master/app/screenshot.PNG)\n\n## Installation\n\n```\nnpm i --save electron-react-titlebar\n```\n\n## Example\n\n```\nnpm run build\nnpm run demo\n```\n\n## Usage\n\n### Main process\n\n```javascript\napp.on('ready', () =\u003e {\n  require('electron-react-titlebar/main').initialize()\n})\n```\n\n### Renderer process\n\n#### If you are using webpack\n\n```javascript\nimport { TitleBar } from 'electron-react-titlebar/renderer'\nimport 'electron-react-titlebar/assets/style.css'\n\nReactDOM.render(\n    \u003cTitleBar menu={menuTemplate} icon={iconPath} /\u003e,\n    document.querySelector('title-bar')\n)\n```\n\n#### If you're not a webpack user and wants to load css directly\n\n```js\nReactDOM.render(\n    \u003cTitleBar menu={menuTemplate} icon={iconPath}\u003e\n      \u003clink rel=\"stylesheet\" type=\"text/css\" href={require.resolve('electron-react-titlebar/assets/style.css')} /\u003e\n    \u003c/TitleBar\u003e,\n    document.body\n)\n```\n\n## Options\n\n### children?: node\n\nElements to be rendered in between the menu and the window controls (optional).\n\n### disableMinimize?: boolean\n\nDisable minimize button (optional).\n\n### disableMaximize?: boolean\n\nDisable maximize button (optional).\n\n### icon?: string\n\nPath to icon file (optional).\n\n### browserWindowId?: number\n\nThe browserWindow's id that window controls affect to. Default value is the browserWindow that renders the component (optional).\n\n### menu?: \\\u003cMenuTemplate\\\u003e\n\nMenu template of [Electron's Menu](https://github.com/electron/electron/blob/master/docs/api/menu.md#main-process) (optional).\n\nNote: electron-react-titlebar is supporting a subset of [Electron's MenuItem](https://github.com/electron/electron/blob/master/docs/api/menu-item.md).\n\nSupported options:\n\n* `click` - supported, but the callback only have `item` and `event` parameter, and the `browserWindow` parameter is removed due to restriction since Electron@14\n* `type` - `submenu` is not supported.\n* `label` - supported\n* `enabled` - supported\n* `visible` - supported\n* `checked` - supported\n\n\n## Breaking changes since v1.0.0\n\nThe v1.0.0 version contains following breaking changes:\n\n- Requires `React@16.8` or newer version\n- Due to the Electron's removal of remote module since version 14, electron-react-titlebar now:\n  - Needs to initialize in main process (See example above)\n  - The require path of component has changed to `electron-react-titlebar/renderer`\n  - The `currentWindow` prop has been removed, instead you can control your browserWindow by `browserWindowId` prop\n  - The second parameter of callback of menuItem's click handler (the browserWindow) has been removed\n\nIf you're still using Electron below 14 and don't want to take breaking changes, you can still use 0.x version of electron-react-titlebar.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochiyaocean%2Felectron-react-titlebar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkochiyaocean%2Felectron-react-titlebar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochiyaocean%2Felectron-react-titlebar/lists"}