<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WidgetConfiguration/containerBackgroundRemovable(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI19WidgetConfigurationP0C3KitE28containerBackgroundRemovableyQrSbF"
  },
  "title" : "containerBackgroundRemovable(_:)"
}
-->

# containerBackgroundRemovable(_:)

A modifier that marks the background of a widget as removable.

```
@MainActor @preconcurrency func containerBackgroundRemovable(_ isRemovable: Bool = true) -> some WidgetConfiguration
```

## Parameters

`isRemovable`

If `true`, the widget supports removal of the container background in
contexts that prefer no backgrounds. If `false`, the system doesn’t remove the background.

## Return Value

A modified widget configuration.

## Discussion

In most cases, mark the background container of a widget as removable to
allow people to place the widget in as many contexts as possible. If you mark the
background as nonremovable, the widget becomes ineligible in various contexts that require a
removable background. For example, a small widget without a removable background doesn’t
appear in the widget gallery on the iPad Lock Screen.

If you mark a background as nonremovable, the system always displays the background
container of the widget. Note that the background may render differently; for example, it can
appear faded or desaturated.

This modifier has no effect on operation system versions prior to iOS 17, watchOS 10, or macOS 14.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)