{"id":13461796,"url":"https://github.com/SwiftUIX/SwiftUIX","last_synced_at":"2025-03-24T22:35:05.886Z","repository":{"id":38206549,"uuid":"190189702","full_name":"SwiftUIX/SwiftUIX","owner":"SwiftUIX","description":"An exhaustive expansion of the standard SwiftUI library.","archived":false,"fork":false,"pushed_at":"2025-02-13T10:07:14.000Z","size":3355,"stargazers_count":7501,"open_issues_count":24,"forks_count":455,"subscribers_count":70,"default_branch":"master","last_synced_at":"2025-03-18T00:40:10.621Z","etag":null,"topics":["attributedstring","backwards-compatibility","collection-view","framework","ios","library","macos","performance","scroll","swift","swift-package-manager","swiftui","textview","visionos"],"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/SwiftUIX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"vmanot"}},"created_at":"2019-06-04T11:40:44.000Z","updated_at":"2025-03-17T23:06:22.000Z","dependencies_parsed_at":"2024-04-28T00:25:48.767Z","dependency_job_id":"93d8d4fb-0bc3-4f36-bce1-a3824ca018af","html_url":"https://github.com/SwiftUIX/SwiftUIX","commit_stats":{"total_commits":2084,"total_committers":61,"mean_commits":34.16393442622951,"dds":0.09404990403071012,"last_synced_commit":"50e2aacd7b124ffb5d06b4bfa5a4f255052a559b"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUIX%2FSwiftUIX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUIX%2FSwiftUIX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUIX%2FSwiftUIX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwiftUIX%2FSwiftUIX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwiftUIX","download_url":"https://codeload.github.com/SwiftUIX/SwiftUIX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366204,"owners_count":20603438,"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":["attributedstring","backwards-compatibility","collection-view","framework","ios","library","macos","performance","scroll","swift","swift-package-manager","swiftui","textview","visionos"],"created_at":"2024-07-31T11:00:57.833Z","updated_at":"2025-03-24T22:35:00.862Z","avatar_url":"https://github.com/SwiftUIX.png","language":"Swift","readme":"# \u003cimg align=top src=\"https://raw.githubusercontent.com/SwiftUIX/SwiftUIX/master/Assets/logo.png\" width=\"36\" height=\"36\"\u003e SwiftUIX\n\n![CI](https://github.com/SwiftUIX/SwiftUIX/workflows/CI/badge.svg)\n\nSwiftUIX attempts to fill the gaps of SwiftUI, providing an extensive suite of components, extensions and utilities to complement the standard library. This project is **by far** the most complete port of missing UIKit/AppKit functionality, striving to deliver it in the most Apple-like fashion possible.\n\n- [Why](#why)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Contents](#contents)\n- [Contributing](#contributing)\n- [License](#license)\n- [Support](#support)\n- [Credits](#credits)\n\n\n# Why\n\nThe goal of this project is to **complement** the SwiftUI standard library, offering hundreds of extensions and views that empower you, the developer, to build applications with the ease promised by the revolution that is SwiftUI.\n\n\n# Requirements\n\n\u003e [!Note]\n\u003e Swift 5.10 is the minimum Swift version required to build SwiftUIX, Swift 5.9 is no longer supported.\n\n- Deployment targets: iOS 13, macOS 10.15, tvOS 13, watchOS 6 and visionOS 1\n- Xcode 15.4+ \n\n\n# Installation\n\nThe preferred way of installing SwiftUIX is via the [Swift Package Manager](https://swift.org/package-manager/).\n\n```swift\n/// Package.swift\n/// ...\ndependencies: [\n    .package(url: \"https://github.com/SwiftUIX/SwiftUIX.git\", branch: \"master\"),\n]\n/// ...\n```\n\n\u003e Xcode 15 integrates with libSwiftPM to provide support for iOS, watchOS, macOS and tvOS platforms.\n\n1. In Xcode, open your project and navigate to **File** → **Swift Packages** → **Add Package Dependency...**\n2. Paste the repository URL (`https://github.com/SwiftUIX/SwiftUIX`) and click **Next**.\n3. For **Rules**, select **Branch** (with branch set to `master`).\n4. Click **Finish**.\n5. Open the Project settings, add **SwiftUI.framework** to the **Linked Frameworks and Libraries**, set **Status** to **Optional**.\n\n\n# Documentation\n\nThe SwiftUIX documentation can be found at:\n\nhttps://swiftuix.github.io/SwiftUIX/documentation/swiftuix/\n\nAll documentation that hasn't been migrated here is available via the [repository wiki](https://github.com/SwiftUIX/SwiftUIX/wiki).\n\n\n# Contents\n\nWhile the project itself is stable and heavily being used in production, its documentation is **work-in-progress**. Contributions are encouraged and welcomed.\n\n### UIKit → SwiftUI\n\n| UIKit                                   | SwiftUI      | SwiftUIX                                   |\n| --------------------------------------- | ------------ | ------------------------------------------ |\n| `LPLinkView`                            | -            | `LinkPresentationView`                     |\n| `UIActivityIndicatorView`               | -            | `ActivityIndicator`                        |\n| `UIActivityViewController`              | -            | `AppActivityView`                          |\n| `UIBlurEffect`                          | -            | `BlurEffectView`                           |\n| `UICollectionView`                      | -            | `CollectionView`                           |\n| `UIDeviceOrientation`                   | -            | `DeviceLayoutOrientation`                  |\n| `UIImagePickerController`               | -            | `ImagePicker`                              |\n| `UIPageViewController`                  | -            | `PaginationView`                           |\n| `UIScreen`                              | -            | `Screen`                                   |\n| `UISearchBar`                           | -            | `SearchBar`                                |\n| `UIScrollView`                          | `ScrollView` | `CocoaScrollView`                          |\n| `UISwipeGestureRecognizer`              | -            | `SwipeGestureOverlay`                      |\n| `UITableView`                           | `List`       | `CocoaList`                                |\n| `UITextField`                           | `TextField`  | `CocoaTextField`                           |\n| `UIModalPresentationStyle`              | -            | `ModalPresentationStyle`                   |\n| `UIViewControllerTransitioningDelegate` | -            | `UIHostingControllerTransitioningDelegate` |\n| `UIVisualEffectView`                    | -            | `VisualEffectView`                         |\n| `UIWindow`                              | -            | `WindowOverlay`                            |\n\n### **Activity**\n\n- `ActivityIndicator`\n\n  ```\n  ActivityIndicator()\n      .animated(true)\n      .style(.large)\n  ```\n\n- `AppActivityView` - a SwiftUI port for `UIActivityViewController`.\n\n  ```swift\n  AppActivityView(activityItems: [...])\n      .excludeActivityTypes([...])\n      .onCancel { }\n      .onComplete { result in\n          foo(result)\n      }\n  ```\n\n### Appearance\n\n- `View/visible(_:)` - Sets a view's visibility.\n\n### CollectionView\n\nUse `CollectionView` within your SwiftUI view, providing it with a data source and a way to build cells.\n\n```swift\nimport SwiftUIX\n\nstruct MyCollectionView: View {\n    let data: [MyModel] // Your data source\n\n    var body: some View {\n        CollectionView(data, id: \\.self) { item in\n            // Build your cell view\n            Text(item.title)\n        }\n    }\n}\n```\n\n### Error Handling\n\n- `TryButton` - A button capable of performing throwing functions.\n\n### Geometry\n\n- `flip3D(_:axis:reverse:)` - Flips this view.\n- `RectangleCorner` - A corner of a Rectangle.\n- `ZeroSizeView` - A zero-size view for when `EmptyView` just doesn't work.\n\n### Keyboard\n\n- `Keyboard` - An object representing the keyboard.\n- `View/padding(.keyboard) `- Pads this view with the active system height of the keyboard.\n\n### Link Presentation:\n\nUse `LinkPresentationView` to display a link preview for a given URL.\n\n```swift\nLinkPresentationView(url: url)\n    .frame(height: 192)\n```\n\n### Navigation Bar\n\n- `View/navigationBarColor(_:)` - Configures the color of the navigation bar for this view.\n- `View/navigationBarTranslucent(_:)` - Configures the translucency of the navigation bar for this view.\n- `View/navigationBarTransparent(_:)` - Configures the transparency of the navigation bar for this view.\n- `View/navigationBarLargeTitle(_:)` - Set a custom view for the navigation bar's large view mode.\n\n### Pagination\n\n- `PaginationView`\n\n  ```swift\n  PaginationView(axis: .horizontal) {\n      ForEach(0..\u003c10, id: \\.hashValue) { index in\n          Text(String(index))\n      }\n  }\n  .currentPageIndex($...)\n  .pageIndicatorAlignment(...)\n  .pageIndicatorTintColor(...)\n  .currentPageIndicatorTintColor(...)\n  ```\n\n### Scrolling\n\n- `View/isScrollEnabled(_:)` - Adds a condition that controls whether users can scroll within this view. Works with:\n\n  - `CocoaList`\n  - `CocoaScrollView`\n  - `CollectionView`\n  - `TextView`\n\n  Does not work with SwiftUI's `ScrollView`.\n\n### Search\n\n- `SearchBar` - A SwiftUI port for `UISearchBar`.\n\n  ```swift\n  struct ContentView: View {\n      @State var isEditing: Bool = false\n      @State var searchText: String = \"\"\n\n      var body: some View {\n          SearchBar(\"Search...\", text: $searchText, isEditing: $isEditing)\n              .showsCancelButton(isEditing)\n              .onCancel { print(\"Canceled!\") }\n      }\n  }\n  ```\n\n- `View/navigationSearchBar(_:)` - Sets the navigation search bar for this view.\n\n  ```swift\n  Text(\"Hello, world!\")\n      .navigationSearchBar {\n          SearchBar(\"Placeholder\", text: $text)\n      }\n  ```\n\n- `View/navigationSearchBarHiddenWhenScrolling(_:)` - Hides the integrated search bar when scrolling any underlying content.\n\n### Screen\n\n- `Screen` - A representation of the device's screen.\n- `UserInterfaceIdiom` - A SwiftUI port for `UIUserInterfaceIdiom`.\n- `UserInterfaceOrientation` - A SwiftUI port for `UserInterfaceOrientation`.\n\n### Scroll\n\n- `ScrollIndicatorStyle` - A type that specifies the appearance and interaction of all scroll indicators within a view hierarchy\n  - `HiddenScrollViewIndicatorStyle` - A scroll indicator style that hides all scroll view indicators within a view hierarchy.\n\n### Status Bar\n\n- `View/statusItem(id:image:`) - Adds a status bar item configured to present a popover when clicked\n\n  ```swift\n  Text(\"Hello, world!\")\n      .statusItem(id: \"foo\", image: .system(.exclamationmark)) {\n          Text(\"Popover!\")\n              .padding()\n      }\n  ```\n\n### Text\n\n- `TextView`\n\n  ```swift\n  TextView(\"placeholder text\", text: $text, onEditingChanged: { editing in\n      print(editing)\n  })\n  ```\n\n### Visual Effects\n\n- `VisualEffectBlurView` - A blur effect view that expands to fill.\n\n  ```swift\n  VisualEffectBlurView(blurStyle: .dark)\n      .edgesIgnoringSafeArea(.all)\n  ```\n\n### Window\n\n- `View/windowOverlay(isKeyAndVisible:content:)` - Makes a window key and visible when a given condition is true.\n\n### Edit Menu\n\n- `View/editMenu(isVisible:content:)` - Adds an edit menu to the view.\n\n  ```swift\n  Text(\"Hello, world!\")\n      .editMenu(isVisible: $isEditMenuVisible) {\n          EditMenuItem(\"Copy\") {\n              // Perform copy action\n          }\n          EditMenuItem(\"Paste\") {\n              // Perform paste action\n          }\n      }\n  ```\n\n\n# Contributing\n\nSwiftUIX welcomes contributions in the form of GitHub issues and pull-requests. Please refer the [projects](https://github.com/SwiftUIX/SwiftUIX/projects) section before raising a bug or feature request, as it may already be under progress.\n\nTo create an Xcode project for SwiftUIX run `bundle install; bundle exec fastlane generate_xcodeproj`.\nTo check the automated builds for SwiftUIX run `bundle install; bundle exec fastlane build`.\n\n\n# License\n\nSwiftUIX is licensed under the [MIT License](https://vmanot.mit-license.org).\n\n\n# Support\n\nSwiftUIX is and will always remain free and open-source.\n\nMaintaining SwiftUIX is a massively time-consuming endeavour. If you're reliant on SwiftUIX for your app/project and would like to see it grow, consider either:\n\n- [Contributing](#contributing)\n- [Donating via Patreon](http://patreon.com/vmanot)\n\n\n# Credits\n\nSwiftUIX is led and maintained by [@vatsal_manot](http://twitter.com/vatsal_manot).\n\nSpecial thanks to [Brett Best](https://github.com/Brett-Best), [Nathan Tanner](https://github.com/nathantannar4), [Kabir Oberai](https://github.com/kabiroberai) and many more.\n\n\n[Documentation]: https://swiftuix.github.io/SwiftUIX\n","funding_links":["https://patreon.com/vmanot","http://patreon.com/vmanot"],"categories":["Swift","Samples","Extensions","toolbar","Libraries","🌎 by the community"],"sub_categories":["Content","Extensions"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSwiftUIX%2FSwiftUIX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSwiftUIX%2FSwiftUIX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSwiftUIX%2FSwiftUIX/lists"}