{"id":15674529,"url":"https://github.com/0xwdg/dynamicui","last_synced_at":"2025-05-06T21:27:42.444Z","repository":{"id":233335807,"uuid":"786820100","full_name":"0xWDG/DynamicUI","owner":"0xWDG","description":"Create a SwiftUI user interface through a JSON file. The JSON file will contain the structure of the user interface, and the program will create the user interface based on the JSON file.","archived":false,"fork":false,"pushed_at":"2025-02-20T20:15:27.000Z","size":15479,"stargazers_count":33,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T14:58:30.604Z","etag":null,"topics":["0xwdg","dynamic","dynamicui","hacktoberfest","interface","spm","swift","swiftui","user","view"],"latest_commit_sha":null,"homepage":"https://0xwdg.github.io/DynamicUI/","language":"Swift","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/0xWDG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"0xWDG"}},"created_at":"2024-04-15T11:16:16.000Z","updated_at":"2025-04-09T23:08:23.000Z","dependencies_parsed_at":"2024-07-23T22:56:57.772Z","dependency_job_id":"11d3bc58-c4d5-4d01-8182-8a8568f38314","html_url":"https://github.com/0xWDG/DynamicUI","commit_stats":null,"previous_names":["0xwdg/jsonui"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xWDG%2FDynamicUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xWDG%2FDynamicUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xWDG%2FDynamicUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xWDG%2FDynamicUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xWDG","download_url":"https://codeload.github.com/0xWDG/DynamicUI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252771252,"owners_count":21801681,"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":["0xwdg","dynamic","dynamicui","hacktoberfest","interface","spm","swift","swiftui","user","view"],"created_at":"2024-10-03T15:46:20.474Z","updated_at":"2025-05-06T21:27:42.437Z","avatar_url":"https://github.com/0xWDG.png","language":"Swift","funding_links":["https://github.com/sponsors/0xWDG"],"categories":[],"sub_categories":[],"readme":"# DynamicUI\n\nCreate a SwiftUI user interface through a JSON file. The JSON file will contain the structure of the user interface, and the program will create the user interface based on the JSON file.\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2F0xWDG%2FDynamicUI%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/0xWDG/DynamicUI) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2F0xWDG%2FDynamicUI%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/0xWDG/DynamicUI)\n[![Swift Package Manager](https://img.shields.io/badge/SPM-compatible-brightgreen.svg)](https://swift.org/package-manager)\n![License](https://img.shields.io/github/license/0xWDG/Inspect)\n\n\u003e [!WARNING]\n\u003e\n\u003e This is a work in progress and not yet ready for production use. \\\n\u003e Please feel free to contribute, report issues, or request features.\n\n## Requirements\n\n- Swift 5.9+ (Xcode 15+)\n- iOS 15+, macOS 12+, tvOS 14+, watchOS 7+, macCatalyst 15+, visionOS 1.0+\n\n## Installation\n\nInstall using Swift Package Manager\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/0xWDG/DynamicUI.git\", branch: \"main\"),\n],\ntargets: [\n    .target(name: \"MyTarget\", dependencies: [\n        .product(name: \"DynamicUI\", package: \"DynamicUI\"),\n    ]),\n]\n```\n\nAnd import it:\n\n```swift\nimport DynamicUI\n```\n\n## Usage\n\n```swift\nimport SwiftUI\nimport DynamicUI\n\nstruct ContentView: View {\n    let json = \"\"\"\n    [\n        {\n            \"type\": \"Text\",\n            \"title\": \"Wait, am i generating views from JSON?\",\n            \"modifiers\": {\"foregroundStyle\":\"red\",\"opacity\":0.6}\n        },\n        {\n            \"type\": \"Button\",\n            \"title\": \"Click me\",\n            \"eventHandler\": \"customHandler\"\n        },\n        {\n            \"type\": \"Toggle\",\n            \"title\": \"Toggle me\",\n            \"identifier\": \"my.toggle.1\"\n        }\n    ]\n    \"\"\".data(using: .utf8)\n\n    var body: some View {\n        DynamicUI(\n            json: json,\n            callback: { component in\n                // This contains everything passed as a component (type, title, identifier, ...)\n                print(component)\n            }\n        )\n    }\n}\n```\n\n### Playground Application:\n\nIn the directory `Playground` is a Xcode project to build the [Playground Application](#Playground)\n\n### Supported View Types:\n\n_Please note:_ Items prefixed with ⚠ may ignore passed parameters.  \nItems \u003cs\u003ewith a strikethrough\u003c/s\u003e are not yet supported.\n\n\u003cdetails\u003e\n\u003csummary\u003eVStack\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"VStack\",\n    \"children\": [  ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHStack\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"HStack\",\n    \"children\": [  ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eZStack\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"ZStack\",\n    \"children\": [  ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eList\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"List\",\n    \"children\": [  ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eScrollView\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"ScrollView\",\n    \"children\": [  ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNavigationView\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"NavigationView\",\n    \"children\": [  ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eForm\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Form\",\n    \"children\": [  ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eButton\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Button\",\n    \"title\": \"Click me!\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eText\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Text\",\n    \"title\": \"...\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eImage\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Image\",\n    \"imageURL\": \"systemName\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDivider\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Divider\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSpacer\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Spacer\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eLabel\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Label\",\n    \"title\": \"...\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTextField\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"TextField\",\n    \"title\": \"...\",\n    \"defaultValue\": \"...\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSecureField\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"SecureField\",\n    \"title\": \"...\",\n    \"defaultValue\": \"...\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTextEditor\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"TextEditor\",\n    \"title\": \"...\",\n    \"defaultValue\": \"...\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eToggle\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Toggle\",\n    \"title\": \"Turn me on!\",\n    \"defaultValue\": true\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e⚠ Gauge\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Gauge\",\n    \"title\": \"...\",\n    \"defaultValue\": 0.5\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e⚠ ProgressView\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"ProgressView\",\n    \"title\": \"...\",\n    \"value\": 50,\n    \"total\": 100\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSlider\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Slider\",\n    \"title\": \"...\",\n    \"minLabel\": \"min\",\n    \"maxLabel\": \"max\"\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGroupBox\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"GroupBox\",\n    \"children\": [ ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDisclosureGroup\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"DisclosureGroup\",\n    \"children\": [ ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHSplitView\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"HSplitView\",\n    \"children\": [ ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVSplitView\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"VSplitView\",\n    \"children\": [ ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e⚠ Picker\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"Picker\",\n    \"title\": \"...\",\n    \"values\": [\"...\", \"...\"]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cs\u003e⚠ NavigationSplitView\u003c/s\u003e\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"NavigationSplitView\",\n    \"children\": [ ]\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cs\u003e⚠ TabView\u003c/s\u003e\u003c/summary\u003e\n\n```JSON\n{\n    \"type\": \"TabView\",\n    \"children\": [ ]\n}\n```\n\n\u003c/details\u003e\n\n## Images\n\n### Playground\n\n\u003ca name=\"Playground\"\u003e\n\u003cimg width=\"804\" alt=\"image\" src=\"https://github.com/user-attachments/assets/cfd7ba02-88b1-410d-a6ba-54c9ebee06e0\"\u003e\n\n### V0.0.1 in action\n\n\u003cimg width=\"835\" alt=\"image\" src=\"https://github.com/0xWDG/DynamicUI/assets/1290461/02e2d735-5496-4b68-a428-9e03815bf4d6\"\u003e\n\n## Used By\n\n- [Aurora Editor](https://github.com/AuroraEditor/AuroraEditor) for custom views in extensions.\n\n## Contact\n\n🦋 [@0xWDG](https://bsky.app/profile/0xWDG.bsky.social)\n🐘 [mastodon.social/@0xWDG](https://mastodon.social/@0xWDG)\n🐦 [@0xWDG](https://x.com/0xWDG)\n🧵 [@0xWDG](https://www.threads.net/@0xWDG)\n🌐 [wesleydegroot.nl](https://wesleydegroot.nl)\n🤖 [Discord](https://discordapp.com/users/918438083861573692)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xwdg%2Fdynamicui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xwdg%2Fdynamicui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xwdg%2Fdynamicui/lists"}