{"id":19312067,"url":"https://github.com/weblineindia/swiftui-side-menu","last_synced_at":"2025-04-12T11:23:03.505Z","repository":{"id":181830273,"uuid":"667396467","full_name":"weblineindia/SwiftUI-Side-Menu","owner":"weblineindia","description":"Using this Sidemenu library allows you to implement sidebar navigation menu in your iOS app, providing a convenient way for users to access various sections or functionalities of your application.","archived":false,"fork":false,"pushed_at":"2023-07-17T13:39:17.000Z","size":3136,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T21:04:04.687Z","etag":null,"topics":["ios","reusable-code","reusable-components","reusable-library","side-menu","side-menu-component","side-menu-controller","swift","swiftui","ui-components","uikit"],"latest_commit_sha":null,"homepage":"https://www.weblineindia.com/software-development-resources.html","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/weblineindia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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}},"created_at":"2023-07-17T12:10:04.000Z","updated_at":"2024-10-21T15:21:55.000Z","dependencies_parsed_at":"2023-07-17T19:11:53.504Z","dependency_job_id":null,"html_url":"https://github.com/weblineindia/SwiftUI-Side-Menu","commit_stats":null,"previous_names":["weblineindia/swiftui-side-menu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FSwiftUI-Side-Menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FSwiftUI-Side-Menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FSwiftUI-Side-Menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weblineindia%2FSwiftUI-Side-Menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weblineindia","download_url":"https://codeload.github.com/weblineindia/SwiftUI-Side-Menu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248558507,"owners_count":21124299,"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":["ios","reusable-code","reusable-components","reusable-library","side-menu","side-menu-component","side-menu-controller","swift","swiftui","ui-components","uikit"],"created_at":"2024-11-10T00:32:35.359Z","updated_at":"2025-04-12T11:23:03.484Z","avatar_url":"https://github.com/weblineindia.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# SwiftUI SideMenu Master Example\n\nThe Sidemenu feature allows you to implement a sidebar navigation menu in your iOS app, providing a convenient way for users to access various sections or functionalities of your application.\n\n## Table of Contents  \n\n- [Demo](#demo)\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [Need Help / Support?](#need-help)\n- [Collection of Components](#collection-of-Components)\n- [License](#license)\n- [Acknowledgements](#acknowledgements)\n- [Keywords](#keywords)\n\n# Demo 📱\n\n\u003cimg src=\"./demo1.gif\" alt=\"Demo1 Normal Preview\"\u003e\n\n\u003cimg src=\"./demo2.gif\" alt=\"Demo2 3D Preview\"\u003e\n\n# Features 🥳\n\n* Demo has SideMenu feature\n* Manage proper navigation by using navigation stack\n* Fully customization available.\n* Demo has complete flow with login and home view page.\n* Minimum iOS Target 16.0\n\n# Installation 💾\n\n    * Clone the repository.\n    * Open the project in Xcode.\n    * Build and run the project.\n\n# Usage \u0026 Integration 👩🏾‍🔬\n\nTo add the Sidemenu feature to your own SwiftUI project, follow the steps below:\n\n** Create your new SwiftUI project with main app content view.  \n** Create a new SwiftUI View that will represent the contents of the sidemenu that may be your root view or other view. And also can create other view to redirect from side menu list options.\n** Drag and drop folder name as `SideMenuSources` as helper source of sidemenu into your project.\n\n### Put the code for your side menu content view:\nHere given the name of side menu content view as `HomeSideMenuView`. which is the initialisaton of side menu with options list. And `WliSideMenuView` is the struct of side menu. which have multiple parameters with default values and can provide your own values data as your need.\n\n```swift\n struct HomeSideMenuView: View {\n    @State var isMenuOpen: Bool = false\n    let tabs = [MenuTabModel(title: \"Home\", imageName: \"house\"), MenuTabModel( title: \"Settings\", imageName: \"gear\")]\n    @State var selectedTab: MenuTabModel = MenuTabModel(title: \"Home\", imageName: \"house\")\n    @State var contentbgColor = Color.white\n    @StateObject var viewModel: HomeSideMenuViewModel\n    \n    var body: some View {\n        content()\n            .navigationBarBackButtonHidden()\n    }\n    @ViewBuilder private func content() -\u003e some View {\n        ZStack {\n            WliSideMenuView(\n                isMenuOpen: $isMenuOpen,\n                tabs: tabs, // add your [MenuTabModel]\n                selectedTab: $selectedTab, //initial selectedTab\n                contenViewtbgColor: $contentbgColor,     //acces view placeholder background\n                bgImage: \"\",     //add your background image! Default value is airplane\n                selectionColor: .yellow,\n                blurRadius: 32,            // add blur radius for image default value is 32\n                enable3D: true, //enable/disable 3D effect\n                bgColor: .white  // set bg color of side menu\n            ) {\n                if selectedTab.title == \"Home\" {\n                    SMHomeView(isMenuOpen: $isMenuOpen, backColor: $contentbgColor, viewModel: viewModel)\n                } else if selectedTab.title == \"Settings\" {\n                    SMSettingView(isMenuOpen: $isMenuOpen, backColor: $contentbgColor, viewModel: viewModel)\n                }\n            }\n        }\n    }\n}\n\n```\n** I have added here two separate side menu options list view for example as `SMHomeView` and `SMSettingView` which use as content view for side menu list. That have own imlementation as per needs.\n\n```swift\n\nstruct SMHomeView: View {\n    @Binding var isMenuOpen: Bool\n    @Binding var backColor: Color\n    @StateObject var viewModel: HomeSideMenuViewModel\n    let holidays = [\"New Year's Day\", \"Valentine's Day\", \"Easter\", \"Christmas\"]\n    \n    var body: some View {\n        ZStack {//Your content is here\n            backColor.ignoresSafeArea().cornerRadius(isMenuOpen ? 12:0)\n            VStack {\n                HStack {\n                    Button(action: { isMenuOpen.toggle() }) {\n                        Image(systemName: \"line.3.horizontal\").font(.title).foregroundColor(.black)\n                    }.padding(.top, 0).padding(.leading, 12).frame(maxWidth: .infinity, alignment: .leading)\n                    Spacer()\n                }.background(Color.white)\n                VStack(alignment: .leading) {\n                    ScrollView {\n                            ForEach(holidays, id: \\.self) { holiday in\n                                Text(holiday).foregroundColor(.black).padding()\n                                Divider()\n                            }\n                    }\n                }\n            }\n        }.onAppear {\n            backColor = .white\n        }\n    }\n}\n \n```\nLike this can implement your list option view as per your need. eg: `SMHomeView`\n** Now can build and run the app.\n\n# Contributing\n\n- Created something awesome, made this code better, added some functionality, or whatever (this is the hardest part).\n- [Fork it](http://help.github.com/forking/).\n- Create new branch to contribute your changes.\n- Commit all your changes to your branch.\n- Submit a [pull request](http://help.github.com/pull-requests/).\n\n\n# Need Help? \n\nWe also provide a free, basic support for all users who want to use this coordinator master demo in project. In case you want to customize this demo input to suit your development needs, then feel free to contact our [iOS SwiftUI Developers](https://www.weblineindia.com/hire-ios-app-developers.html).\n\n# Collection of Components\n\n We have built many other components and free resources for software development in various programming languages. Kindly click here to view our [Free Resources for Software Development.](https://www.weblineindia.com/software-development-resources.html)\n \n# Changelog\n\n Detailed changes for each release are documented in [CHANGELOG](./CHANGELOG).\n\n# License 📃\n\nThis project is licensed under the MIT License. Feel free to use, modify, and distribute the code as permitted by the license.\n\n# Acknowledgements\n\nThis app was created using SwiftUI and leverages various libraries and resources. We would like to acknowledge and express our gratitude to the following:\n* SwiftUI: Apple's declarative framework for building user interfaces.\n* Xcode: Integrated development environment (IDE) provided by Apple.\n* Open-source libraries: Various open-source libraries and frameworks used in the project.\n* Community contributors: Contributors who have provided support, bug fixes, and enhancements.\n\n# Keywords\n\nSideMenu Master, SwiftUI, SideMenu-ViewModel Pattern, SideBar Patten, SideMenu Drawer, Navigation Stack, SideBar Reusable Component, SwiftUI SideBar, Swift5, iOS 16, WeblineIndia\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweblineindia%2Fswiftui-side-menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweblineindia%2Fswiftui-side-menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweblineindia%2Fswiftui-side-menu/lists"}