---
title: "init(supportedFamilies:content:)"
framework: appintents
role: symbol
role_heading: Initializer
platforms: [iOS 27.3+, iPadOS 27.3+, Mac Catalyst 27.3+, macOS 27.3+, tvOS 27.3+, visionOS 27.3+, watchOS 27.3+]
path: "appintents/cardsnippet/init(supportedfamilies:content:)"
---

# init(supportedFamilies:content:)

Creates a card snippet with the views for specific families of content.

## Declaration

```swift
init(supportedFamilies: [CardSnippetFamily], @ViewBuilder content: @escaping @MainActor (Entity, CardSnippetContext) -> Content)
```

## Parameters

- `supportedFamilies`: The families the card supports. Each family represents the intended context and amount of space available for your custom views. For example, specifydoc://com.apple.AppIntents/documentation/AppIntents/CardSnippetFamily/standard if your views are suitable for display on iPhone. If you don’t support the family the system needs, the system presents your entity using content from its display representation instead.
- `content`: The view builder to create your view. The closure for the view builder takes the following parameters:

## Discussion

Discussion The builder can adapt the layout based on the rendering family from the card snippet context. CardSnippet(supportedFamilies: [.standard]) { recipe, context in    switch context.family {        case .standard:             LargeRecipeCardView(recipe: recipe)         default:             RecipeCardView(recipe: recipe)     } } Use this initializer to deliver a SwiftUI view with the visual representation of your entity. Create your view primarily with static content such as text and images. The system renders snippets in advance and stores your views in a static archive it can use at any time, including when your app isn’t running, so you can’t change the content of your view later. If your view requires data that isn’t immediately available, prepare the data before you return the SwiftUI view from your closure. 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.
