<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/SpatialTemplateSeatElement",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Group Activities"
    ],
    "preciseIdentifier" : "s:15GroupActivities26SpatialTemplateSeatElementV"
  },
  "title" : "SpatialTemplateSeatElement"
}
-->

# SpatialTemplateSeatElement

A spatial template element that represents a seat for a participant
in the activity.

```
struct SpatialTemplateSeatElement
```

## Overview

Add [`SpatialTemplateSeatElement`](/documentation/GroupActivities/SpatialTemplateSeatElement) types to a custom [`SpatialTemplate`](/documentation/GroupActivities/SpatialTemplate)
to specify the placement and orientation of participants in a group
activity. When an activity starts, the system places participants
into the shared coordinate space and orients them according to the
seat information you provide. If you associate roles with one or more
seats, participants must acquire the associated role before they can
occupy the corresponding seat.

Create seat elements directly from this type and add them to the
[`elements`](/documentation/GroupActivities/SpatialTemplate/elements) property of your custom template.
Alternatively, use the inherited `seat(position:direction:role:)`
function to create seats, as shown in the following example, which
creates two seats on either side of the app’s content along the z-axis:

```swift
struct BasicTemplate: SpatialTemplate {
    var elements: [any SpatialTemplateElement] = [
        .seat(position: .app.offsetBy(x: 0, z: 1)),
        .seat(position: .app.offsetBy(x: 0, z: -1)),
    ]
}
```

## Topics

### Creating a seat element

### Getting the element details

[`let position: SpatialTemplateElementPosition`](/documentation/GroupActivities/SpatialTemplateSeatElement/position)

The location of the element in the shared coordinate space.

[`let direction: SpatialTemplateElementDirection`](/documentation/GroupActivities/SpatialTemplateSeatElement/direction)

The initial orientation of the element in the shared coordinate
space.

[`let role: (any SpatialTemplateRole)?`](/documentation/GroupActivities/SpatialTemplateSeatElement/role)

An optional role you associate with this element.

### Operators

[`static func == (SpatialTemplateSeatElement, SpatialTemplateSeatElement) -> Bool`](/documentation/GroupActivities/SpatialTemplateSeatElement/==(_:_:))

Returns a Boolean value that indicates whether two values are equal.

### Initializers

[`init(position: SpatialTemplateElementPosition, direction: SpatialTemplateElementDirection, role: (any SpatialTemplateRole)?)`](/documentation/GroupActivities/SpatialTemplateSeatElement/init(position:direction:role:))

Creates a seat element with the specified position, direction,
and role information.

### Instance Methods

[`func hash(into: inout Hasher)`](/documentation/GroupActivities/SpatialTemplateSeatElement/hash(into:))

Hashes the essential components of this value by feeding them
into the given hasher.

## Relationships

### Conforms To

[`SpatialTemplateElement`](/documentation/GroupActivities/SpatialTemplateElement)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)