---
title: "liveLiteral"
description: "Constructs a [State] object identified by the provided global [key] and initialized to the provided [value]."
type: "function"
---
## API Reference

### liveLiteral

> Source set: Common

```kotlin
public fun <T> liveLiteral(key: String, value: T): State<T>
```

Constructs a [State](/jetpack-compose/androidx.compose.runtime/runtime/interfaces/State/api) object identified by the provided global [key](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/key/api) and initialized to the
provided `value`. This value may then be updated from tooling with the [updateLiveLiteralValue](/jetpack-compose/androidx.compose.runtime/runtime/functions/updateLiveLiteralValue/api)
API. Only a single [State](/jetpack-compose/androidx.compose.runtime/runtime/interfaces/State/api) object will be created for any given [key](/jetpack-compose/androidx.compose.runtime/runtime/composable-functions/key/api).

Caution: This API is intended to be used by tooling only. Use at your own risk.
