# A2uiComponent

## Functions summary

|---|---|
| `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/a2ui/compose/ui/A2uiComponent.composable#A2uiComponent(androidx.a2ui.compose.runtime.A2uiComponentModel,androidx.compose.ui.Modifier)(component: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentModel, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier)` Emits the UI for a successfully resolved A2UI component state into the Compose hierarchy. |

## Functions

### A2uiComponent

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

```
@Composable
fun A2uiComponent(component: A2uiComponentModel, modifier: Modifier = Modifier): Unit
```

Emits the UI for a successfully resolved A2UI component state into the Compose hierarchy.

This composable acts as a dynamic router for recursive component rendering. It extracts the `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog` from the component's underlying surface, looks up the registered Compose-specific implementation for that component type, and delegates rendering to its `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiComponent#(androidx.a2ui.compose.runtime.A2uiComponentScope).Content(androidx.a2ui.compose.runtime.A2uiComponentProperties,androidx.compose.ui.Modifier)` extension function.

| Parameters |
|---|---|
| `component: https://developer.android.com/reference/kotlin/androidx/a2ui/compose/runtime/A2uiComponentModel` | The resolved component containing properties and context. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | The `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` to be applied to the component's root layout. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | If the underlying catalog does not implement `https://developer.android.com/reference/kotlin/androidx/a2ui/compose/ui/A2uiCatalog`, or if the component type is not registered in the catalog. |