---
title: widgetRenderingMode
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/environmentvalues/widgetrenderingmode
---

# widgetRenderingMode

The widget’s rendering mode, based on where the system is displaying it.

## Declaration

```swift
var widgetRenderingMode: WidgetRenderingMode { get set }
```

## Discussion

Discussion You can read the rendering mode from the environment values using this key. @Environment(\.widgetRenderingMode) var widgetRenderingMode Then modify the widget’s appearance based on the mode. var body: some View {     ZStack {        switch renderingMode {         case .fullColor:            Text("Full color")         case .accented:            ZStack {                Circle(...)                VStack {                    Text("Accented")                        .widgetAccentable()                    Text("Normal")                }            }         case .vibrant:            Text("Full color")         default:            ...         }     } }

## See Also

### Widgets

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