{"id":18258117,"url":"https://github.com/sidneys/electron-titlebar-windows","last_synced_at":"2025-05-07T18:09:22.161Z","repository":{"id":57221934,"uuid":"67870017","full_name":"sidneys/electron-titlebar-windows","owner":"sidneys","description":"Adds the Windows 10 ModernUI (Metro)-style titlebars to any Electron-based desktop app.","archived":false,"fork":false,"pushed_at":"2020-09-20T01:21:53.000Z","size":191,"stargazers_count":140,"open_issues_count":12,"forks_count":23,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-07T18:08:42.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sidneys.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}},"created_at":"2016-09-10T12:35:16.000Z","updated_at":"2024-10-17T14:15:42.000Z","dependencies_parsed_at":"2022-08-31T08:30:16.310Z","dependency_job_id":null,"html_url":"https://github.com/sidneys/electron-titlebar-windows","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Felectron-titlebar-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Felectron-titlebar-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Felectron-titlebar-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sidneys%2Felectron-titlebar-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sidneys","download_url":"https://codeload.github.com/sidneys/electron-titlebar-windows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931536,"owners_count":21827111,"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":[],"created_at":"2024-11-05T10:29:08.006Z","updated_at":"2025-05-07T18:09:22.133Z","avatar_url":"https://github.com/sidneys.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-titlebar-windows\n\n**Adds CSS-based Windows 10 Modern UI title bars to any Electron-based desktop app.**\n\n\n\n![screen](screen.png)\n\n\n\n# Installation\n\n```\n$ npm install --save electron-titlebar-windows\n```\n\n\n# API\n\n### Importing the module\n\n```js\nconst ElectronTitlebarWindows = require('electron-titlebar-windows');\n```\n\n### Creating a new instance\n\nThe module takes a single optional `options` argument and exports the `TitleBar` class:\n\n```js\nconst titlebar = new ElectronTitlebarWindows(options);\n```\n\nProperties of `options`:\n - (optional) **darkMode** - `String` - **Light titlebar buttons (for dark backgrounds)**\n - (optional) **color** - `String` - **Icon color (Hex)**\n - (optional) **backgroundColor** - `String` - **Bar color (Hex)**\n - (optional) **draggable** - `Boolean` - **Titlebar enables dragging of contained window**\n - (optional) **fullscreen** - `Boolean` - **Resize button initializes in fullscreen mode**\n\n### Methods\n\n#### #appendTo\n\nShows the Title Bar.\n\n```js\ntitlebar.appendTo(contextElement);\n```\n\n - (optional) **contextElement** - `HTMLElement` - Default: `document.body` - **Element to which to add the titlebar**  \n\n\n#### #destroy\n\nRemoves the Title Bar.\n\n```js\ntitlebar.destroy();\n```\n\n\n### Events\n\n`TitleBar` emits the following events:\n\n- `minimize`\n- `maximize`\n- `fullscreen`\n- `close`\n\n```js\ntitlebar.on('close', function(e) {\n    console.log('close');\n});\n```\n\n\n\n## License\n\nMIT © [sidneys](http://sidneys.github.io)\n\n\n\n## Related\n\nBased on [titlebar](https://github.com/kapetan/titlebar)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidneys%2Felectron-titlebar-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidneys%2Felectron-titlebar-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidneys%2Felectron-titlebar-windows/lists"}