<div class='sourceset sourceset-android'>Android</div>

```kotlin
public class InteractionPolicy(
    public val isEnabled: Boolean = true,
    public val onInputEvent: ((SpatialInputEvent) -> Unit),
)
```

Defines the interaction policy for a spatial object. This policy enables reacting to a user's
spatial inputs.

## Companion Object

#### Methods

<h2 id="clickable-isenabled-onclick">clickable</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun clickable(isEnabled: Boolean = true, onClick: () -> Unit): InteractionPolicy
```

An [InteractionPolicy](/jetpack-compose/androidx.xr.compose/compose/classes/InteractionPolicy) that detects only click inputs

#### Parameters

| | |
| --- | --- |
| isEnabled | Whether an interaction policy is enabled for this object. If `false`, click events will not be returned. |
| onClick | Executed after a click occurs. |

#### Returns

| | |
| --- | --- |
|  | an [InteractionPolicy](/jetpack-compose/androidx.xr.compose/compose/classes/InteractionPolicy) that filters for click events. |