<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WidgetKit",
  "identifier" : "/documentation/WidgetKit/AccessoryWidgetBackground",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit09AccessoryA10BackgroundV"
  },
  "title" : "AccessoryWidgetBackground"
}
-->

# AccessoryWidgetBackground

An adaptive background view that provides a standard appearance based on the
the widget’s environment.

```
@MainActor @preconcurrency struct AccessoryWidgetBackground
```

## Overview

Use this view to provide a standardized background for your accessory
widgets. Place the view in
a <doc://com.apple.documentation/documentation/SwiftUI/ZStack> behind your
widget’s content.

```Swift
ZStack {
    AccessoryWidgetBackground()
    VStack {
        Text("MON")
            .font(.caption)
            .widgetAccentable()
        Text("6")
            .font(.title)
    }
}
```

The system only displays this view inside a
[`WidgetFamily.accessoryCircular`](/documentation/WidgetKit/WidgetFamily/accessoryCircular),
[`WidgetFamily.accessoryCorner`](/documentation/WidgetKit/WidgetFamily/accessoryCorner), or
[`WidgetFamily.accessoryRectangular`](/documentation/WidgetKit/WidgetFamily/accessoryRectangular) widget. In any other
context, the system displays an empty view instead.

## Topics

### Creating accessory widget backgrounds

[`init()`](/documentation/WidgetKit/AccessoryWidgetBackground/init())

Creates an instance of an accessory widget background.



---

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)