{"id":15099281,"url":"https://github.com/vinlemon/window-controls","last_synced_at":"2026-02-14T01:02:49.212Z","repository":{"id":242337414,"uuid":"808298372","full_name":"vinlemon/window-controls","owner":"vinlemon","description":"Web components offering native-like window controls, primarily designed for Tauri 2.","archived":false,"fork":false,"pushed_at":"2024-06-10T08:23:52.000Z","size":383,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T20:45:23.393Z","etag":null,"topics":["controls","linux","macos","tauri","tauri2","web-components","window-controls","windows"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@vinlemon/window-controls","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/vinlemon.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":"2024-05-30T19:24:17.000Z","updated_at":"2024-12-11T12:20:11.000Z","dependencies_parsed_at":"2024-09-15T17:22:28.030Z","dependency_job_id":null,"html_url":"https://github.com/vinlemon/window-controls","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"7400dd6776a309d189d22aed49c5c86ae57a8ddf"},"previous_names":["vinlemon/window-controls"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/vinlemon/window-controls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinlemon%2Fwindow-controls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinlemon%2Fwindow-controls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinlemon%2Fwindow-controls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinlemon%2Fwindow-controls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinlemon","download_url":"https://codeload.github.com/vinlemon/window-controls/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinlemon%2Fwindow-controls/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29427632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"last_error":"SSL_read: 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":["controls","linux","macos","tauri","tauri2","web-components","window-controls","windows"],"created_at":"2024-09-25T17:09:17.547Z","updated_at":"2026-02-14T01:02:49.156Z","avatar_url":"https://github.com/vinlemon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cpicture\u003e\n  \u003cimg alt=\"Window Controls\" src=\"https://github.com/vinlemon/window-controls/raw/main/assets/badge.png\"\u003e\n\u003c/picture\u003e\n\n[![Preview](https://img.shields.io/badge/Preview-window--controls.vinlemon.com-blue)](https://window-controls.vinlemon.com/)\n[![](https://img.shields.io/npm/v/@vinlemon/window-controls.svg?logo=npm)](https://www.npmjs.com/package/@vinlemon/window-controls)\n\n## Introduction\n\nFor a preview, visit: [window-controls.vinlemon.com](https://window-controls.vinlemon.com/)\n\nBuilt using the [lit](https://lit.dev/) library, these components are available:\n\n- `WindowControls`: Displays window controls for all operating systems.\n- `MacOsControls`, `WindowsControls`, `GnomeControls`: Display window controls for their respective operating systems.\n\nThis web component follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.\n\nThis project takes inspiration from [tauri-controls](https://github.com/agmmnn/tauri-controls).\n\n### Installation\n\n```bash\nnpm i @vinlemon/window-controls\n```\n\n### Quick Usage\n\n```html\n\u003cscript type=\"module\"\u003e\n  import '@vinlemon/window-controls/window-controls.js';\n\u003c/script\u003e\n\n\u003cwindow-controls\u003e\u003c/window-controls\u003e\n```\n\n### Example with Tauri 2\n\n```js\nimport \"@vinlemon/window-controls/window-controls.js\";\nimport { Window } from \"@tauri-apps/api/window\";\nimport { platform } from \"@tauri-apps/plugin-os\";\n\nconst windowControls = document.createElement(\"window-controls\");\n\nconst appWindow = new Window(\"main\");\n\nplatform.then((currentPlatform) =\u003e {\n\twindow.document.body.appendChild(windowControls);\n\twindowControls.os = currentPlatform;\n\twindowControls.minimize = appWindow.minimize;\n\twindowControls.maximize = appWindow.toggleMaximize;\n\twindowControls.close = appWindow.close;\n});\n\nappWindow.listen(\"tauri://focus\", () =\u003e {\n\tif (windowControls) {\n\t\twindowControls.inactive = false;\n\t}\n});\n\nappWindow.listen(\"tauri://blur\", () =\u003e {\n\tif (windowControls) {\n\t\twindowControls.inactive = true;\n\t}\n});\n```\n\n## Options\n\n### `WindowControls`:\n- **os**: Specifies the operating system. Accepts `\"macos\"`, `\"windows\"`, or `\"linux\"`.\n- **inactive**: Boolean to indicate if the window is inactive.\n- **minimize**: Function to minimize the window.\n- **maximize**: Function to maximize the window.\n- **close**: Function to close the window.\n\n### `MacOsControls`:\n- **inactive**: Boolean to indicate if the window is inactive.\n- **minimize**: Function to minimize the window.\n- **maximize**: Function to maximize the window.\n- **close**: Function to close the window.\n\n### `WindowsControls`:\n- **minimize**: Function to minimize the window.\n- **maximize**: Function to maximize the window.\n- **close**: Function to close the window.\n\n### `GnomeControls`:\n- **minimize**: Function to minimize the window.\n- **maximize**: Function to maximize the window.\n- **close**: Function to close the window.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinlemon%2Fwindow-controls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinlemon%2Fwindow-controls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinlemon%2Fwindow-controls/lists"}