{"id":13479888,"url":"https://github.com/capy-ui/capy","last_synced_at":"2025-05-14T06:14:01.216Z","repository":{"id":37347950,"uuid":"351056766","full_name":"capy-ui/capy","owner":"capy-ui","description":"💻Build one codebase and get native UI on Windows, Linux and Web","archived":false,"fork":false,"pushed_at":"2025-04-19T11:43:04.000Z","size":15626,"stargazers_count":2065,"open_issues_count":19,"forks_count":77,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-19T16:57:43.471Z","etag":null,"topics":["cross-platform","cross-platform-gui","gui","gui-library","linux","ui","user-interface","windows","zig","zig-package","ziglang"],"latest_commit_sha":null,"homepage":"https://capy-ui.org","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capy-ui.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,"zenodo":null}},"created_at":"2021-03-24T11:36:16.000Z","updated_at":"2025-04-18T03:32:26.000Z","dependencies_parsed_at":"2023-10-17T01:58:28.480Z","dependency_job_id":"95ecd3aa-9a6c-400d-bb00-ad7efe928a12","html_url":"https://github.com/capy-ui/capy","commit_stats":{"total_commits":603,"total_committers":25,"mean_commits":24.12,"dds":0.08955223880597019,"last_synced_commit":"c54ea2c17c9863b9dbc71b04ba0aaf0740d5f355"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capy-ui%2Fcapy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capy-ui%2Fcapy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capy-ui%2Fcapy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capy-ui%2Fcapy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capy-ui","download_url":"https://codeload.github.com/capy-ui/capy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254083791,"owners_count":22011902,"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":["cross-platform","cross-platform-gui","gui","gui-library","linux","ui","user-interface","windows","zig","zig-package","ziglang"],"created_at":"2024-07-31T16:02:24.919Z","updated_at":"2025-05-14T06:14:01.193Z","avatar_url":"https://github.com/capy-ui.png","language":"Zig","readme":"\u003ca href=\"https://capy-ui.org\"\u003e\n    \u003cp align=\"center\"\u003e\n        \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://capy-ui.org/img/capy_big2_dark.png\"\u003e\n            \u003cimg src=\"https://capy-ui.org/img/capy_big2.png\" alt=\"Capy UI\" height=\"200px\"\u003e\n        \u003c/picture\u003e\n    \u003c/p\u003e\n\u003c/a\u003e\n\n**As of now, Capy is NOT ready for use in production as I'm still making breaking changes**\n\n**Capy targets Zig version `0.14.0-dev.1911+3bf89f55c` / `2024.10.0-mach` ([Nominated Zig versions](https://machengine.org/docs/nominated-zig/))**\n, it doesn't work on Zig `0.13.0`\n\n---\n\n[![Code Coverage](https://img.shields.io/codecov/c/github/capy-ui/capy?style=for-the-badge)](https://app.codecov.io/gh/capy-ui/capy)\n[![MPL-2.0 License](https://img.shields.io/github/license/capy-ui/capy?style=for-the-badge)](https://github.com/capy-ui/capy/blob/master/LICENSE)\n\n![the glorius software in action](https://raw.githubusercontent.com/zenith391/bottom-zig-gui/main/.github/screenshot.png)\n\n## Introduction\n\nCapy is a **GUI library for Zig**. It is mainly intended for creating applications using native controls from the operating system.\nCapy is a declarative UI library aiming to be easy to write for and versatile.\n\nIt has been made with the goal to empower standalone UI applications, integration in games or any other rendering process is a non-goal.\n\n## Features\n- Use Zig for frontend and backend\n- Accessibility: compatibility with almost all accessibility tools\n- Cross-platform\n- Uses the target OS toolkit\n- Cross-compilable from any platform to any other platform\n- *Tiny* executables - Every [example](https://github.com/capy-ui/capy/tree/master/examples)'s size \u003c 2MB, which is smaller than 'hello world' in Go\n\n## Getting Started\n\nIf you're starting a new project, simply clone [capy-template](https://github.com/capy-ui/capy-template) and follow build instructions.\n\nOtherwise or for more information, please look in the [docs](https://capy-ui.org/docs/getting-started/installation).\n\nYou can ask questions and receive updates on the [#capy-ui Matrix channel](https://matrix.to/#/#capy-ui:matrix.org).\n\n## Usage\n\nA simple application using capy:\n\n```zig\nconst capy = @import(\"capy\");\nconst std = @import(\"std\");\npub usingnamespace capy.cross_platform;\n\npub fn main() !void {\n    try capy.init();\n\n    var window = try capy.Window.init();\n    try window.set(\n        capy.column(.{ .spacing = 10 }, .{ // have 10px spacing between each column's element\n            capy.row(.{ .spacing = 5 }, .{ // have 5px spacing between each row's element\n                capy.button(.{ .label = \"Save\", .onclick = @ptrCast(\u0026buttonClicked) }),\n                capy.button(.{ .label = \"Run\",  .onclick = @ptrCast(\u0026buttonClicked) })\n            }),\n            // 'expanded' means the widget will take all the space it can\n            // in the parent container\n            capy.expanded(\n                capy.textArea(.{ .text = \"Hello World!\" })\n            )\n        })\n    );\n\n    window.setPreferredSize(800, 600);\n    window.show();\n    capy.runEventLoop();\n}\n\nfn buttonClicked(button: *capy.Button) !void {\n    std.log.info(\"You clicked the button with text {s}\", .{button.getLabel()});\n}\n```\n\nIt is easy to add something like a button or a text area. The example can already be used to notice a widget's parameters are usually enclosed in anonymous\nstructs (`.{ .label = \"Save\" }`). You can also see that simply wrapping a widget with `capy.Expanded( ... )` will tell it to take all the space it can.\n\n## Contributing\nContributing can be as simple as opening an issue and detailling what bug you encountered or what feature you wish to have.  \nIf you want to help the project more directly, you can fork the project and then create a pull request.\n\n## Supported platforms\n\nA platform is considered supported only if it can be built to from every other OS.\n\nLegends:\n- ✅ Working and can be cross-compile from all platforms supported by Zig\n- 🧪 Experimental\n- 🏃 Planned\n\n### Desktop\n\n✅ Windows x86_64  \n✅ Windows i386\n\n🏃 macOS M1  \n🏃 macOS x86_64  \n\n✅ Linux x86_64  \n✅ Linux i386  \n✅ Linux aarch64 (PinePhone, PineBook...)  \n\n✅ FreeBSD x86_64  \n\n### Mobile\n\n🧪 Android  \n🏃 iOS\n\n### Web\n\n✅ WebAssembly\n\nNote: As there's no \"official\" GUI library for Linux, GTK 4 has been chosen as it is the one\nthat works and can be configured on the most distros. It's also the reason Libadwaita won't\nbe adopted, as it's meant for GNOME and GNOME only by disallowing styling and integration\nwith other DEs.\n\n\n\n## Supported components\nFor now, not every platform supports the same components. So here's a list of the ones that are supported:\n\n|                  |win32|macOS|GTK|Android|wasm|\n|------------------|-----|-----|---|-----|-----|\n|Button            |✅|✅|✅|✅|✅|\n|Canvas            |❌|❌|✅|✅|✅|\n|CheckBox          |✅|❌|✅|❌|❌|\n|Dropdown          |✅|❌|✅|❌|❌|\n|Image             |❌|❌|✅|❌|✅|\n|Label             |✅|✅|✅|✅|✅|\n|Menu              |❌|❌|❌|❌|❌|\n|Navigation        |❌|❌|❌|❌|❌|\n|NavigationSidebar |❌|❌|✅|❌|❌|\n|Scrollable        |✅|❌|✅|❌|❌|\n|Slider            |✅|❌|✅|❌|✅|\n|Tabs              |✅|❌|✅|❌|❌|\n|TextArea          |✅|❌|✅|❌|❌|\n|TextField         |✅|❌|✅|✅|✅|\n|Window            |✅|✅|✅|✅|✅\n","funding_links":[],"categories":["Zig","Libraries","zig","Multimedia \u0026 Graphics"],"sub_categories":["GUI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapy-ui%2Fcapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapy-ui%2Fcapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapy-ui%2Fcapy/lists"}