Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

yeahitsjan/MacControlCenterUI

Open more actions menu
 
 

Repository files navigation

Mac Control Center UI

Platforms | macOS 11 Xcode 14 License: MIT

Example

A menu builder and suite of SwiftUI controls that closely mimic the feel of macOS Control Center menus.

Integrates seamlessly with SwiftUI's MenuBarExtra.

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: "2.3.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 14 on macOS 12.5 or newer.

Supports macOS 11.0+ once compiled.

Known Issues

  • Due to the lacklustre implementation of window resize behavior in SwiftUI, it is currently not possible to get smooth window resize animations without a tremendous amount of work. For that reason, most MacControlCenterUI controls whose Control Center counterparts use animation will instead use safer static view size changes.
    • Note that macOS 26 introduces improvements to how SwiftUI resizes windows as a result of animating view size changes. Once macOS 26 is close to public (non-beta) release, this will be investigated and conditional improvements may be possible to MacControlCenterUI menu behavior on that OS version.

Author

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

License

Licensed under the MIT license. See LICENSE for details.

Sponsoring

If you enjoy using MacControlCenterUI and want to contribute to open-source financially, GitHub sponsorship is much appreciated. Feedback and code contributions are also welcome.

Community & Support

Please do not email maintainers for technical support. Several options are available for issues and questions:

  • Questions and feature ideas can be posted to Discussions.
  • If an issue is a verifiable bug with reproducible steps it may be posted in Issues.

Contributions

Contributions are welcome. Posting in Discussions first prior to new submitting PRs for features or modifications is encouraged.

About

SwiftUI menu builder DSL & controls that mimic macOS Control Center. - backup fork

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.