---
title: "init(sceneAnchor:contentAlignment:content:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/uihostingornament/init(sceneanchor:contentalignment:content:)"
---

# init(sceneAnchor:contentAlignment:content:)

Creates an ornament with the specified alignment and content.

## Declaration

```swift
init(sceneAnchor: UnitPoint, contentAlignment: Alignment = .center, @ContentBuilder content: () -> Content)
```

## Parameters

- `sceneAnchor`: The anchor point for aligning the ornament’s content (based on the contentAlignment) with the scene.
- `contentAlignment`: The alignment in the ornament used to position it.
- `content`: The content of the ornament.

## See Also

### Creating a hosting ornament

- [rootView](swiftui/uihostingornament/rootview.md)
