---
title: "associatedKind(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/widgetconfiguration/associatedkind(_:)"
---

# associatedKind(_:)

Tells the system that a relevance-based widget can replace a timeline-based widget.

## Declaration

```swift
@MainActor @preconcurrency func associatedKind(_ associatedKind: String?) -> some WidgetConfiguration

```

## Discussion

Discussion If you offer a timeline-based widget and a widget that uses relevance clues, a person could pin the timeline widget to the Smart Stack, and several instances of the relevance-based widget could appear in the Smart Stack, causing the stack to run out of space. To allow the Smart Stack to display the most relevant widgets by replacing the timeline-based widget with your widgets that use relevance clues, associate your timeline-based widget with relevance widget configuration using associatedKind(_:). note: Use this modifier for a widget you configure with a RelevanceConfiguration and provide an associated timeline-based widget. The system ignores associations with other relevance-based widgets and if your configuration doesn’t conform to RelevanceConfiguration. For more information about widgets that appear in the Smart Stack on Apple Watch, refer to doc:Widget-Suggestions-In-Smart-Stacks. parameter: associatedKind: The string that identifies the associated timeline-based widget.
