<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WidgetKit",
  "identifier" : "/documentation/WidgetKit/TimelineProvider/placeholder(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit16TimelineProviderP11placeholder2in5EntryQzAA0cD7ContextV_tF"
  },
  "title" : "placeholder(in:)"
}
-->

# placeholder(in:)

Provides a timeline entry representing a placeholder version of the
widget.

```
func placeholder(in context: Self.Context) -> Self.Entry
```

## Parameters

`context`

An object that describes the context in which to
show the widget.

## Return Value

A timeline entry that represents a placeholder version of the
widget.

## Discussion

When WidgetKit displays your widget for the first time, it renders the widget’s
view as a placeholder. A placeholder view displays a generic representation of
your widget, giving the user a general idea of what the widget shows. WidgetKit
calls `placeholder(in:)` to request an entry representing
the widget’s placeholder configuration. For example, the game status widget
would implement this method as follows:

```
struct GameStatusProvider: TimelineProvider {
    func placeholder(in context: Context) -> SimpleEntry {
       GameStatusEntry(date: Date(), gameStatus: "—")
    }
}
```

In addition, WidgetKit may render your widget as a placeholder if users choose to hide sensitive
information on Apple Watch or the iPhone Lock Screen. To learn more about redacting sensitive
data, see [Creating a widget extension](/documentation/WidgetKit/Creating-a-Widget-Extension).

> Important: `placeholder(in:)` is synchronous and returns
> a `TimelineEntry` immediately. Return from `placeholder(in:)` as quickly
> as possible.

---

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)