---
title: "init(windowID:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/windowvisibilitytoggle/init(windowid:)"
---

# init(windowID:)

Create a window visibility toggle to alter the visibility of a specific window.

## Declaration

```swift
nonisolated init(windowID: String) where Label == DefaultWindowVisibilityToggleLabel
```

## Parameters

- `windowID`: The id of the singleton window type that should be toggled. If this is not a valid id, the toggle will be disabled and non-functional.
