---
title: "toggleQuickLookPreviewPanel(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextview/togglequicklookpreviewpanel(_:)"
---

# toggleQuickLookPreviewPanel(_:)

An action message that toggles the visibility state of the Quick Look preview panel.

## Declaration

```swift
@IBAction func toggleQuickLookPreviewPanel(_ sender: Any?)
```

## Parameters

- `sender`: The message sender.

## Discussion

Discussion This action message toggles the visibility state of the Quick Look preview panel if the receiver is the current Quick Look controller.

## See Also

### Supporting QuickLook

- [updateQuickLookPreviewPanel()](appkit/nstextview/updatequicklookpreviewpanel().md)
- [quickLookPreviewableItems(inRanges:)](appkit/nstextview/quicklookpreviewableitems(inranges:).md)
