---
title: AccessoryWidgetBackground
framework: widgetkit
role: symbol
role_heading: Structure
path: widgetkit/accessorywidgetbackground
---

# AccessoryWidgetBackground

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

## Declaration

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

## Mentioned in

Migrating ClockKit complications to WidgetKit Displaying the right widget background

## Overview

Overview Use this view to provide a standardized background for your accessory widgets. Place the view in a ZStack behind your widget’s content. ZStack {     AccessoryWidgetBackground()     VStack {         Text("MON")             .font(.caption)             .widgetAccentable()         Text("6")             .font(.title)     } } The system only displays this view inside a WidgetFamily.accessoryCircular, WidgetFamily.accessoryCorner, or WidgetFamily.accessoryRectangular widget. In any other context, the system displays an empty view instead.

## Topics

### Creating accessory widget backgrounds

- [init()](widgetkit/accessorywidgetbackground/init().md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [View](swiftui/view.md)

## See Also

### Layout and presentation

- [Supporting additional widget sizes](widgetkit/supporting-additional-widget-sizes.md)
- [Displaying the right widget background](widgetkit/displaying-the-right-widget-background.md)
- [Optimizing your widget for accented rendering mode and Liquid Glass](widgetkit/optimizing-your-widget-for-accented-rendering-mode-and-liquid-glass.md)
- [Adding StandBy and CarPlay support to your widget](widgetkit/adding-standby-and-carplay-support-to-your-widget.md)
- [WidgetRenderingMode](widgetkit/widgetrenderingmode.md)
- [WidgetAccentedRenderingMode](widgetkit/widgetaccentedrenderingmode.md)
- [WidgetLocation](widgetkit/widgetlocation.md)
