<!--
{
  "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/TimelineEntryRelevance",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit22TimelineEntryRelevanceV"
  },
  "title" : "TimelineEntryRelevance"
}
-->

# TimelineEntryRelevance

An object that describes the relative importance of a timeline entry
compared to other entries in the current and past timelines.

```
struct TimelineEntryRelevance
```

## Overview

When users put widgets into a Smart Stack, WidgetKit uses the
[`relevance`](/documentation/WidgetKit/TimelineEntry/relevance) property of the entries your timeline
provider generates to determine how relevant they are to the user. For
each timeline entry that your provider creates, you may assign relevance
that contains a [`score`](/documentation/WidgetKit/TimelineEntryRelevance/score) and a
[`duration`](/documentation/WidgetKit/TimelineEntryRelevance/duration). The score is a value you choose that
indicates the relevance of the widget, relative to entries across timelines
that the provider creates. When the date of an entry arrives, and for the
duration you specify, WidgetKit may rotate your widget to the top of the
stack so it becomes visible.

A timeline entry’s assigned relevance isn’t the only factor that determines
whether WidgetKit rotates your widget to the top of the
Smart Stack. For more information, see [Increasing the visibility of widgets in Smart Stacks](/documentation/WidgetKit/Widget-Suggestions-In-Smart-Stacks).

## Topics

### Creating a Relevance Object

[`init(score:duration:)`](/documentation/WidgetKit/TimelineEntryRelevance/init(score:duration:))

Creates an object that represents the importance of a widget and the
length of time for WidgetKit to consider it for rotation to the top of
the stack.

### Configuring Relevance Properties

[`duration`](/documentation/WidgetKit/TimelineEntryRelevance/duration)

The number of seconds, following an entry’s date, that WidgetKit considers
the widget for rotation to the top of the stack.

[`score`](/documentation/WidgetKit/TimelineEntryRelevance/score)

A value that indicates the relevance of an entry compared to other
entries in the current and past timelines.



---

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)