<!--
{
  "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/IntentTimelineProvider/placeholder(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit22IntentTimelineProviderP11placeholder2in5EntryQzAA0dE7ContextV_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  <doc://com.apple.documentation/documentation/WidgetKit/emoji-rangers-supporting-live-activities-interactivity-and-animations>
sample code project implements this method for its leaderboard widget as follows:

```
struct LeaderboardProvider: TimelineProvider {

    public typealias Entry = LeaderboardEntry

    func placeholder(in context: Context) -> LeaderboardEntry {
        return LeaderboardEntry(date: Date(), heros: EmojiRanger.availableHeros)
    }
}
```

In addition, WidgetKit may render your widget as a placeholder if user’s 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)