# NavigationEventInfo

Artifact: [androidx.navigationevent:navigationevent](https://developer.android.com/jetpack/androidx/releases/navigationevent) [View Source](https://cs.android.com/search?q=file:androidx/navigationevent/NavigationEventInfo.kt+class:androidx.navigationevent.NavigationEventInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

*** ** * ** ***

Common/AllAndroid/JVMJavaScript
- Cmn

  ```
  abstract class NavigationEventInfo
  ```
Known direct subclasses [NavBackStackEntryInfo](https://developer.android.com/reference/kotlin/androidx/navigation/compose/NavBackStackEntryInfo), [NavigationEventInfo.None](https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo.None), [SceneInfo](https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneInfo)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/compose/NavBackStackEntryInfo` | Snapshot of a back stack entry in a `https://developer.android.com/reference/kotlin/androidx/navigation/NavController`. |
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo.None` | A default used when no specific information is associated with a navigation event. |
| `https://developer.android.com/reference/kotlin/androidx/navigation3/scene/SceneInfo` | Represents a snapshot of the visible destinations in a navigation container. |

*** ** * ** ***

Provides contextual information about a navigation state (e.g., a screen or route).

Implement this interface on objects that represent a specific state in your UI. A typical implementation should be a data holder (such as a `data class`) that defines meaningful structural equality (`equals`/`hashCode`). This ensures that navigation state comparisons, state flows, and recompositions work as expected. Failing to provide proper equality can lead to unnecessary recompositions or infinite update loops.

Guidelines for implementors:

- Prefer `data class` to automatically provide equality and `toString`.

- Keep instances immutable for predictable behavior in state flows.

- Ensure equality reflects the logical identity of the navigation state.

This allows you to associate custom, comparable data with a system navigation event emissions.

## Summary

| ### Nested types |
|---|
| `object https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo.None : https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo` A default used when no specific information is associated with a navigation event. |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo#NavigationEventInfo()()` | Cmn |

| ### Public properties |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/navigationevent/ExperimentalNavigationEventApi https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo#title()` Defines the title of the navigation destination. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/navigationevent/ExperimentalNavigationEventApi https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInfo#url()` Defines the URL or path representation of the navigation destination. | Cmn |

## Public constructors

### NavigationEventInfo

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
NavigationEventInfo()
```

## Public properties

### title

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.2.0)

```
@ExperimentalNavigationEventApi
open val title: String?
```

Defines the title of the navigation destination.

Host environments can use this value to represent the active destination (e.g., a web browser's tab title).

Follow these best practices:

- **Localization**: Localize or translate the value.

- **Resolution**: Resolve resource IDs to strings before returning.

- **Formatting** : Interpolate dynamic parameters directly (e.g., `"Details - $id"`).

Defaults to `null`, meaning the title remains unchanged.

### url

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.2.0)

```
@ExperimentalNavigationEventApi
open val url: String?
```

Defines the URL or path representation of the navigation destination.

Host environments can use this value to update their location display (e.g., a web browser's address bar).

For web environments, this supports:

- **Full URL** (e.g., `"https://example.com/home"`): must match the active origin.

- **Relative path** (e.g., `"/home"`): appends to the active origin.

- **Hash fragment** (e.g., `"#home"`): triggers a hash navigation.

Defaults to `null`, meaning the location remains unchanged.