---
title: "init(expanded:compactLeading:compactTrailing:minimal:)"
framework: widgetkit
role: symbol
role_heading: Initializer
path: "widgetkit/dynamicisland/init(expanded:compactleading:compacttrailing:minimal:)"
---

# init(expanded:compactLeading:compactTrailing:minimal:)

Creates a configuration object with views that appear in the Dynamic Island.

## Declaration

```swift
init<Expanded, CompactLeading, CompactTrailing, Minimal>(@DynamicIslandExpandedContentBuilder expanded: @escaping () -> DynamicIslandExpandedContent<Expanded>, @ViewBuilder compactLeading: @escaping () -> CompactLeading, @ViewBuilder compactTrailing: @escaping () -> CompactTrailing, @ViewBuilder minimal: @escaping () -> Minimal) where Expanded : View, CompactLeading : View, CompactTrailing : View, Minimal : View
```

## Parameters

- `expanded`: A closure that builds the view for the expanded presentation of the Live Activity.
- `compactLeading`: A closure that builds the view for the compact leading presentation of the Live Activity.
- `compactTrailing`: A closure that builds the view for the compact trailing presentation of the Live Activity.
- `minimal`: A closure that builds the view for the minimal presentation of the Live Activity.

## See Also

### Creating the view for the Dynamic Island

- [DynamicIslandExpandedRegion](widgetkit/dynamicislandexpandedregion.md)
