---
title: showsWidgetContainerBackground
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/environmentvalues/showswidgetcontainerbackground
---

# showsWidgetContainerBackground

An environment variable that indicates whether the background of a widget appears.

## Declaration

```swift
var showsWidgetContainerBackground: Bool { get }
```

## Return Value

Return Value true if, by default, the background appears in this context; false otherwise.

## Discussion

Discussion In iOS 16 and earlier, this environment variable is always true for system widgets and false for accessory widgets. In macOS 13 and earlier, and in watchOS 9 and earlier, it always evaluates to true. If you pass false to containerBackgroundRemovable(_:) to always show the widget background, the system shows the widget background even if showsWidgetContainerBackground evaluates to true.

## See Also

### Widgets

- [showsWidgetLabel](swiftui/environmentvalues/showswidgetlabel.md)
- [widgetFamily](swiftui/environmentvalues/widgetfamily.md)
- [widgetRenderingMode](swiftui/environmentvalues/widgetrenderingmode.md)
- [widgetContentMargins](swiftui/environmentvalues/widgetcontentmargins.md)
