A suite of SwiftUI views that mimic macOS Control Center controls

Mac Control Center UI

A suite of SwiftUI views that mimic the look and feel of controls used in macOS Control Center (introduced in Big Sur).

Careful attention has been paid to reproducing small details, such as the slider knob gradually fading as it approaches the image overlay, and the sound slider image overlay changing between muted, low, medium, and high volume symbols to match macOS’s Control Center behavior.

Both Dark and Light Mode are fully supported.

Getting Started

Swift Package Manager (SPM)

  1. Add MacControlCenterUI as a dependency using Swift Package Manager.

    • In an app project or framework, in Xcode:

      • Select the menu: File → Swift Packages → Add Package Dependency…
      • Enter this URL: https://github.com/orchetect/MacControlCenterUI
    • In a Swift Package, add it to the Package.swift dependencies:

      .package(url: "https://github.com/orchetect/MacControlCenterUI", from: "0.1.0")
  2. Import the library:

    import MacControlCenterUI
  3. Try the Demo example project to see all of the available controls in action.

Requirements

Minimum requirements to compile: Xcode 12 on macOS 10.15 Catalina or newer.

Supports macOS 10.15+ once compiled.

Author

Coded by a bunch of ? hamsters in a trenchcoat that calls itself @orchetect.

License

Licensed under the MIT license. See LICENSE for details.

Contributions

Contributions are welcome. Feel free to post an Issue to discuss.

GitHub

View Github