<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TipKit",
  "identifier" : "/documentation/TipKit/Tips/Parameter",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "TipKit"
    ],
    "preciseIdentifier" : "s:6TipKit4TipsO9ParameterV"
  },
  "title" : "Parameter"
}
-->

# Parameter

A type that monitors the state of its wrapped value to reevaluate any dependent tip rules when the value changes.

```
struct Parameter<Value> where Value : Decodable, Value : Encodable, Value : Sendable
```

## Overview

You create a parameter by wrapping a conforming type with the `@Parameter` macro.
An `id` is generated based on the parameter’s enclosing instance and the name of the property it is wrapping.

> Note: Parameters are persistent by default. Wrapping a property with `@Parameter` will persist its value between app launches within the tips datastore.
> Passing ``doc://com.apple.TipKit/documentation/TipKit/Tips/ParameterOption/transient`` as an option will allow the parameter to reset to a default value the first time it is referenced.

Tips must be configured using [`configure(_:)`](/documentation/TipKit/Tips/configure(_:)) before a parameter’s value will be updated.

Pair parameters with the tip properties you want to monitor.

For example, to track whether someone has previously used a feature in your app, define a property wrapper, along with the parameter with the value you want to track in your tip as follows:

```swift
struct LandmarksUser {
    // Define the user interaction you want to use for a display rule.
    @Parameter
    static var hasFavoritedLandmark: Bool = false
}
```

Then construct a rule for your tip based on that parameter:

```swift
struct FavoriteLandmarkTip: Tip {
    var rules: [Rule] {
        // Tip will only display when `hasFavoritedLandmark` is false.
        #Rule(LandmarksUser.hasFavoritedLandmark) {
            $0 == false
        }
    }
}
```

## Topics

### Parameter options

[`ParameterOption.transient`](/documentation/TipKit/Tips/ParameterOption/transient)

An option that resets the parameter value the first time it is referenced.

## See Also

[`Rule`](/documentation/TipKit/Tips/Rule)

A condition to meet before displaying a tip.



---

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)