---
title: "widgetTexture(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/widgetconfiguration/widgettexture(_:)"
---

# widgetTexture(_:)

Specifies the widget texture for this widget.

## Declaration

```swift
@MainActor @preconcurrency func widgetTexture(_ material: WidgetTexture) -> some WidgetConfiguration

```

## Return Value

Return Value A widget configuration using the specified widget texture.

## Discussion

Discussion Widgets in visionOS use a have a material treatment applied. By default, all widgets use the glass widget texture. Use this modifier to explicitly set the widget texture for a widget. The following displays a widget whose texture is paper: AppIntentConfiguration(     kind: kind, intent: LatestPostConfiguration.self, provider: Provider() ) { entry in     LatestPostsView(entry: entry) } .widgetTexture(.paper)
