<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PresentationComponent/init(configuration:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit",
      "SwiftUI",
      "_RealityKit_SwiftUI"
    ],
    "preciseIdentifier" : "s:19_RealityKit_SwiftUI21PresentationComponentV13configuration7contentA2C13ConfigurationV_xtc0cD04ViewRzlufc"
  },
  "title" : "init(configuration:content:)"
}
-->

# init(configuration:content:)

Present `content` using modality and options specified by
`configuration`. A component created using this method will have its
`isPresented` property default to `true`, which means it will present
as soon as an entity with the component is added to the hierarchy.

```
nonisolated init<Content>(configuration: PresentationComponent.Configuration, content: Content) where Content : View
```

## Parameters

`configuration`

A configuration that specifies the modality,
appearance, and behavior of the presentation.

`content`

The SwiftUI view hierarchy that you want to present with
the component.

## Discussion

Use this component when you want to present a modal that is anchored to
an entity. Listen to `ComponentEvents.DidChange` event to receive
notification about the presentation’s dismissal. To control the
presentation through a SwiftUI Binding, use
`PresentationComponent(isPresented:configuration:content)`

---

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)