<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WidgetConfiguration/widgetTexture(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI19WidgetConfigurationP0C3KitE13widgetTextureyQrAD0cG0VF"
  },
  "title" : "widgetTexture(_:)"
}
-->

# widgetTexture(_:)

Specifies the widget texture for this widget.

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

## Return Value

A widget configuration using the specified widget texture.

## 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)
```

---

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)