SwiftUIWindowStyles icon indicating copy to clipboard operation
SwiftUIWindowStyles copied to clipboard

Showcase of window and toolbar style combinations possible with SwiftUI on macOS.

SwiftUI .windowStyle() .windowToolbarStyle()

Showcase of window and toolbar styles on macOS using SwiftUI.

ā†’ HOW TO: Add the .windowStyle() and/or .windowToolbarStyle() modifiers to WindowGroup within you App struct:

WindowGroup { /* ... */ }
  .windowStyle(.automatic)
  .windowToolbarStyle(.automatic)

šŸ§‘ā€šŸ’» Have a look at the SwiftUI source file in order to see how to create the toolbar etc.

šŸ¦– If you are an AppKit developer you might find this helpful as well: NSWindowStyles.

Feel free to make a pull request if you have a style to add.

.windowStyle(.automatic)

.windowToolbarStyle(.automatic)

.windowToolbarStyle(.expanded)

.windowToolbarStyle(.unified)

.windowToolbarStyle(.unifiedCompact)

.windowStyle(.hiddenTitleBar)

.windowToolbarStyle(.automatic)

.windowToolbarStyle(.expanded)

.windowToolbarStyle(.unified)

.windowToolbarStyle(.unifiedCompact)

.windowStyle(.titleBar)

.windowToolbarStyle(.automatic)

.windowToolbarStyle(.expanded)

.windowToolbarStyle(.unified)

.windowToolbarStyle(.unifiedCompact)

About

Iā€™m Martin, an indie dev from Berlin. Enjoying my work? Have a look at some great apps of mine on the Mac App Store šŸŒ€