# NavActionBuilder

Artifact: [androidx.navigation:navigation-common](https://developer.android.com/jetpack/androidx/releases/navigation) [View Source](https://cs.android.com/search?q=file:androidx/navigation/NavDestinationBuilder.android.kt+class:androidx.navigation.NavActionBuilder) Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/navigation/NavActionBuilder "View this page in Java") Common/AllAndroid/JVMJavaScript
- android

  ```
  @NavDestinationDsl
  class NavActionBuilder
  ```

*** ** * ** ***

DSL for building a `https://developer.android.com/reference/kotlin/androidx/navigation/NavAction`.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/NavActionBuilder#NavActionBuilder()()` | android |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavActionBuilder#navOptions(kotlin.Function1)(optionsBuilder: https://developer.android.com/reference/kotlin/androidx/navigation/NavOptionsBuilder.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/navigation/NavOptions` for this action that should be used by default | android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavActionBuilder#defaultArguments()` The set of default arguments that should be passed to the destination. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavActionBuilder#destinationId()` The ID of the destination that should be navigated to when this action is used | android |

## Public constructors

### NavActionBuilder

android Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
NavActionBuilder()
```

## Public functions

### navOptions

android Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
fun navOptions(optionsBuilder: NavOptionsBuilder.() -> Unit): Unit
```

Sets the `https://developer.android.com/reference/kotlin/androidx/navigation/NavOptions` for this action that should be used by default

## Public properties

### defaultArguments

android Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
val defaultArguments: MutableMap<String, Any?>
```

The set of default arguments that should be passed to the destination. The keys used here should be the same as those used on the `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestinationBuilder#argument(kotlin.String,kotlin.Function1)` for the destination.

All values added here should be able to be added to a `https://developer.android.com/reference/kotlin/androidx/savedstate/SavedState`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/NavAction#defaultArguments()` |   |

### destinationId

android Added in [2.4.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.4.0)

```
var destinationId: Int
```

The ID of the destination that should be navigated to when this action is used