<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: -",
    "macOS: 27.3.0 -",
    "tvOS: 27.3.0 -",
    "visionOS: 27.3.0 -",
    "watchOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/SnippetRepresentableEntity/snippet",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents26SnippetRepresentableEntityP7snippet4BodyQzvpZ"
  },
  "title" : "snippet"
}
-->

# snippet

The snippet that contains the view to display.

```
@EntitySnippetContentBuilder<Self> static var snippet: Self.Body { get }
```

## Discussion

Set the value of this property to a result builder that returns a [`CardSnippet`](/documentation/AppIntents/CardSnippet) type. Initialize the
type with the SwiftUI view that displays the content from the provided entity. The following example
shows an implementation of this property for an app entity that manages one of the app’s photos. The
`PhotoCardView` is a custom SwiftUI view from the app that displays the provided entity and other
relevant information.

```swift
extension PhotoEntity: SnippetRepresentableEntity {
    static var snippet: some EntitySnippetContent<Self> {
        CardSnippet(supportedFamilies: [.standard]) { photo, context in
            PhotoCardView(photo: photo)
        }
    }
}
```

If your view requires data that isn’t immediately available in your entity, prepare the data before you
return the SwiftUI view from your snippet. For example, if you need to create custom images, create them
before you return your view. Prepare data synchronously to ensure it’s available
when you create your view. If you generate data asynchronously, it likely won’t be available in time.

---

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)