Swift95

Workspace​Link95

A button that opens or focuses a route in the nearest workspace.

WorkspaceLink95 is the shared launch action for Start-menu rows and other controls that target Workspace95.

Use it

import Swift95
import SwiftUI

struct WorkspaceLink95Example: View {
  private enum Route: Hashable { case notes }

  var body: some View {
    WorkspaceLink95("Notes", value: Route.notes)
      .swiftUI { button in
        button.keyboardShortcut("n", modifiers: .command)
      }
  }
}

Essential behavior

ActionOpens a closed route or focuses its existing window.
MenuDismisses the enclosing StartMenu95 after activation.
Native APIsUse swiftUI(_:) for keyboard shortcuts and context menus.

Related

Open the complete WorkspaceLink95 API reference →