---
title: "placeholder(in:)"
framework: widgetkit
role: symbol
role_heading: Instance Method
path: "widgetkit/intenttimelineprovider/placeholder(in:)"
---

# placeholder(in:)

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

## Declaration

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

## Parameters

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

## Return Value

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

## Discussion

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  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. important: placeholder(in:) is synchronous and returns a TimelineEntry immediately. Return from placeholder(in:) as quickly as possible.

## See Also

### Generating Timelines

- [getSnapshot(for:in:completion:)](widgetkit/intenttimelineprovider/getsnapshot(for:in:completion:).md)
- [getTimeline(for:in:completion:)](widgetkit/intenttimelineprovider/gettimeline(for:in:completion:).md)
- [Entry](widgetkit/intenttimelineprovider/entry.md)
- [Intent](widgetkit/intenttimelineprovider/intent.md)
- [recommendations()](widgetkit/intenttimelineprovider/recommendations().md)
- [IntentTimelineProvider.Context](widgetkit/intenttimelineprovider/context.md)
