# A2uiSurfaceDefaults

Artifact: [androidx.compose.material3:material3-a2ui](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/a2ui/A2uiSurface.kt+class:androidx.compose.material3.a2ui.A2uiSurfaceDefaults) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/compose-material3#1.0.0-alpha02)


```
object A2uiSurfaceDefaults
```

<br />

*** ** * ** ***

Contains the defaults for `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurface.composable#A2uiSurface(androidx.a2ui.model.processor.A2uiSurfaceModel,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,kotlin.Function1)` visual states and transitions.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurfaceDefaults#ErrorFallback(androidx.a2ui.model.protocol.A2uiException)(exception: https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiException)` The default error fallback displaying the error message for use by `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurface.composable#A2uiSurface(androidx.a2ui.model.processor.A2uiSurfaceModel,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,kotlin.Function1)` when the root component transitions to an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentState.Error` state. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurfaceDefaults#LoadingIndicator()()` The default loading indicator for use by `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurface.composable#A2uiSurface(androidx.a2ui.model.processor.A2uiSurfaceModel,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,kotlin.Function1)` when the root component is in an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentState.Loading` state. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/AnimatedContentTransitionScope<https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentState>.() -> https://developer.android.com/reference/kotlin/androidx/compose/animation/ContentTransform` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurfaceDefaults#transitionSpec()` The default structural transition animation spec used by `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurface.composable#A2uiSurface(androidx.a2ui.model.processor.A2uiSurfaceModel,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,kotlin.Function1)` when transitioning between root component loading, success, and error states. |

## Public functions

### ErrorFallback

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/compose-material3#1.0.0-alpha02)

```
@Composable
fun ErrorFallback(exception: A2uiException): Unit
```

The default error fallback displaying the error message for use by `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurface.composable#A2uiSurface(androidx.a2ui.model.processor.A2uiSurfaceModel,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,kotlin.Function1)` when the root component transitions to an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentState.Error` state.

| Parameters |
|---|---|
| `exception: https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiException` | the `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiException` detailing the error that caused the render failure |

### LoadingIndicator

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/compose-material3#1.0.0-alpha02)

```
@Composable
fun LoadingIndicator(): Unit
```

The default loading indicator for use by `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurface.composable#A2uiSurface(androidx.a2ui.model.processor.A2uiSurfaceModel,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,kotlin.Function1)` when the root component is in an `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentState.Loading` state.

## Public properties

### transitionSpec

```
val transitionSpec: AnimatedContentTransitionScope<A2uiComponentState>.() -> ContentTransform
```

The default structural transition animation spec used by `https://developer.android.com/reference/kotlin/androidx/compose/material3/a2ui/A2uiSurface.composable#A2uiSurface(androidx.a2ui.model.processor.A2uiSurfaceModel,androidx.compose.ui.Modifier,kotlin.Function0,kotlin.Function1,kotlin.Function1)` when transitioning between root component loading, success, and error states.