{"id":13466886,"url":"https://github.com/onl1ner/TabBar","last_synced_at":"2025-03-26T00:31:36.745Z","repository":{"id":37624513,"uuid":"404404451","full_name":"onl1ner/TabBar","owner":"onl1ner","description":"📱 TabBar – highly customizable tab bar (i.e. TabView) for your SwiftUI application.","archived":false,"fork":false,"pushed_at":"2024-08-04T16:54:42.000Z","size":39,"stargazers_count":454,"open_issues_count":14,"forks_count":46,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-21T07:43:31.339Z","etag":null,"topics":["bar","custom-tab-bar","custom-tab-view","custom-tabbar","custom-tabview","ios","library","swift","swift-ui","swiftui","tab","tab-bar","tabbar","tabview","uitabbar","uitabbarcontroller","view","xcode"],"latest_commit_sha":null,"homepage":"","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/onl1ner.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":"2021-09-08T15:41:47.000Z","updated_at":"2025-03-19T07:55:11.000Z","dependencies_parsed_at":"2024-08-04T18:49:49.094Z","dependency_job_id":"debb62f3-aa2d-4a12-9e12-c946fbc1089a","html_url":"https://github.com/onl1ner/TabBar","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FTabBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FTabBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FTabBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onl1ner%2FTabBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onl1ner","download_url":"https://codeload.github.com/onl1ner/TabBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566098,"owners_count":20636390,"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":["bar","custom-tab-bar","custom-tab-view","custom-tabbar","custom-tabview","ios","library","swift","swift-ui","swiftui","tab","tab-bar","tabbar","tabview","uitabbar","uitabbarcontroller","view","xcode"],"created_at":"2024-07-31T15:00:51.049Z","updated_at":"2025-03-26T00:31:36.275Z","avatar_url":"https://github.com/onl1ner.png","language":"Swift","readme":"# TabBar\n\n![](https://img.shields.io/badge/platform-iOS-lightgrey)\n![](https://img.shields.io/badge/iOS-13.0%2B-blue)\n![](https://img.shields.io/badge/Swift-5-orange?logo=Swift\u0026logoColor=white)\n\n`SwiftUI` standard `TabView` component is not so flexible and to customize it you have to modify appearance proxy of `UITabBar` or implement your own one from scratch. The goal of this library is to solve this problem.\n\n## Table of contents\n\n* [Requirements](#requirements)\n* [Installation](#installation)\n    * [Swift Package Manager](#swift-package-manager)\n* [Usage](#usage)\n    * [Customization](#customization)\n* [Contribution](#contribution)\n* [License](#license)\n\n## Requirements\n\n- SwiftUI\n- iOS 13.0 or above\n\n## Installation\n\n**TabBar** is available through [Swift Package Manager](https://github.com/apple/swift-package-manager)\n\n### Swift Package Manager\n- In Xcode select: \n\n  ```\n  File \u003e Swift Packages \u003e Add Package Dependency...\n  ```\n  \n- Then paste this URL: \n\n  ```\n  https://github.com/onl1ner/TabBar.git\n  ```\n  \n## Usage\n\nTo start using `TabBar` you have to create an enum which will implement `Tabbable` protocol:\n\n```swift\nenum Item: Int, Tabbable {\n    case first = 0\n    case second\n    case third\n    \n    var icon: String {\n        switch self {\n            case .first:  // Name of icon of first item.\n            case .second: // Name of icon of second item.\n            case .third:  // Name of icon of third item.\n        }\n    }\n    \n    var title: String {\n        switch self {\n            case .first:  // Title of first item.\n            case .second: // Title of second item.\n            case .third:  // Title of third item.\n        }\n    }\n}\n```\n\nAfter that you will be able to create `TabBar` instance:\n\n```swift\nstruct ContentView: View {\n    @State private var selection: Item = .first\n    @State private var visibility: TabBarVisibility = .visible\n\n    var body: some View {\n        TabBar(selection: $selection, visibility: $visibility) {\n            Text(\"First\")\n                .tabItem(for: Item.first)\n            \n            Text(\"Second\")\n                .tabItem(for: Item.second)\n            \n            Text(\"Third\")\n                .tabItem(for: Item.third)\n        }\n        .tabBar(style: CustomTabBarStyle())\n        .tabItem(style: CustomTabItemStyle())\n    }\n}\n```\n\nAfter these actions tab bar with default style will be created.\n\n### Customization\n\n`TabBar` component is highly customizable. This is achieved by introducing `TabBarStyle` and `TabItemStyle` protocols. By implementing each of the protocol you will be able to build your custom tab bar. **NOTE** that `TabBar` automaticaly pushes down to bottom any of tab bar styles.\n\nAfter creating your custom styles you may inject them to your tab bar by using `tabBar(style:)` and `tabItem(style:)` functions. Here is the showcase of default style and one of the examples of what you can achieve by customizing tab bar:\n\n![](https://github.com/onl1ner/onl1ner/blob/master/Resources/TabBar/Showcase.png?raw=true)\n\n## Contribution\n\nIf you struggle with something feel free to [open an issue](https://github.com/onl1ner/TabBar/issues/new). Pull requests are also appreciated.\n\n## License\n\n**TabBar** is under the terms and conditions of the MIT license.\n\n```\nMIT License\n\nCopyright (c) 2021 Tamerlan Satualdypov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n","funding_links":[],"categories":["Libs","\u003e 100 ⭐️"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonl1ner%2FTabBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonl1ner%2FTabBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonl1ner%2FTabBar/lists"}