# WearWidgetDocument

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


```
class WearWidgetDocument : WearWidgetData
```

<br />

*** ** * ** ***

Defines the content of a widget using Remote Compose.

The provided composable content will be captured into a Remote Compose document for display within a widget.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/glance/wear/WearWidgetDocument#WearWidgetDocument(androidx.glance.wear.WearWidgetBrush,kotlin.Function0)( background: https://developer.android.com/reference/kotlin/androidx/glance/wear/WearWidgetBrush, content: @https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/layout/RemoteComposable @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` |

## Public constructors

### WearWidgetDocument

Added in [1.0.0-alpha22](https://developer.android.com/jetpack/androidx/releases/glance-wear#1.0.0-alpha22)

```
WearWidgetDocument(
    background: WearWidgetBrush,
    content: @RemoteComposable @Composable () -> Unit
)
```

| Parameters |
|---|---|
| `background: https://developer.android.com/reference/kotlin/androidx/glance/wear/WearWidgetBrush` | The `https://developer.android.com/reference/kotlin/androidx/glance/wear/WearWidgetBrush` for the widget's background. The system draws this behind the `https://developer.android.com/reference/kotlin/androidx/glance/wear/WearWidgetDocument#content()`, applying host-defined clipping and padding. It is strongly recommended to explicitly define a non-transparent background. If the given `https://developer.android.com/reference/kotlin/androidx/glance/wear/WearWidgetDocument#background()` is empty, a default surface color will be applied. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/remote/creation/compose/layout/RemoteComposable @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The RemoteComposable content of the widget. This content is rendered in a padded area on top of the background. See `https://developer.android.com/reference/kotlin/androidx/glance/wear/core/WearWidgetParams#horizontalPaddingDp()` and `https://developer.android.com/reference/kotlin/androidx/glance/wear/core/WearWidgetParams#verticalPaddingDp()`. |