<!--
{
  "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/Tip/id",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "TipKit"
    ],
    "preciseIdentifier" : "s:6TipKit0A0P2idSSvp"
  },
  "title" : "id"
}
-->

# id

The tip’s unique identifier.

```
var id: String { get }
```

## Overview

> Note: More information on custom tip identifiers can be found in WWDC24 Session 10070: [Customize feature discovery with TipKit](https://developer.apple.com/videos/play/wwdc2024/10070?time=312).

By default the type name of the `Tip` conforming struct will be used as the tip’s `id`.
Specifying a custom `id` allows you to create reusable tips based on their content.

```swift
struct NewTrailTip: Tip {
    let newTrail: Trail
    
    var id: String {
        "NewTrailTip-\(newTrail.id)"
    }
}
    
struct TrailList: View {
    let newTrail: Trail
    
    var body: some View {
        // Creates a different tip for each new trail.
        let newTrailTip = NewTrailTip(newTrail)
        TipView(newTrailTip)
    }
}
```

---

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)