swiftui-frameless-window

main

🚥 Frameless window Scene for SwiftUI. Just a bare window.
astzweig/swiftui-frameless-window

FramelessWindow

Frameless window on macOS

FramelessWindow adds a new window scenes to SwiftUI. Frameless windows are windows without a titlebar and only the close default button. Frameless windows are often used as a launcher window, i.e. as Xcode does.

Usage

Create a window without the title bar and only the close default button.

import SwiftUI
import FramelessWindow

@main
struct YourApp: App {
    var body: some Scene {
        FramelessWindow(withId: "window-id") {
            ContentView()
        }
    }
}

Documentation

The library has enriched symbol documentation for DocC.

Adding FramelessWindow as a Dependency

To use the FramelessWindow library in a SwiftUI project, add it to the dependencies for your package:

let package = Package(
    // name, platforms, products, etc.
    dependencies: [
        // other dependencies
        .package(url: "https://github.com/astzweig/swiftui-frameless-window", from: "1.0.0"),
    ],
    targets: [
        .executableTarget(name: "<command-line-tool>", dependencies: [
            // other dependencies
            .product(name: "FramelessWindow", package: "swiftui-frameless-window"),
        ]),
        // other targets
    ]
)

Supported Versions

The minimum Swift version supported by swiftui-frameless-window releases are detailed below:

swiftui-frameless-window Minimum Swift Version
0.0.1 ... 5.7

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Oct 20 2024 17:48:04 GMT-0900 (Hawaii-Aleutian Daylight Time)