---
title: "fillableData"
description: "The current value of a component that can be autofilled.

This property is used to expose the component's current data *to* the autofill service. The
service can then read this value, for example, to save it for future autofill suggestions.

This is the counterpart to the [onFillData] action, which is used to *receive* data from the
autofill service."
type: "property"
---

<div class='type'>Property</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
var SemanticsPropertyReceiver.fillableData
```


The current value of a component that can be autofilled.

This property is used to expose the component's current data *to* the autofill service. The
service can then read this value, for example, to save it for future autofill suggestions.

This is the counterpart to the `onFillData` action, which is used to *receive* data from the
autofill service.



## Code Examples

### AutofillableTextFieldWithFillableDataSemantics
```kotlin
@Composable
fun AutofillableTextFieldWithFillableDataSemantics() {
    val state = rememberTextFieldState()
    TextField(
        state = state,
        label = { Text("Enter your username here.") },
        modifier =
            Modifier.semantics {
                contentType = ContentType.Username
                // Set the fillable data with semantics.
                FillableData.createFromText(state.text)?.let { fillableData = it }
                // Replace the state value with data from the autofill provider.
                onFillData { savedAutofillValue ->
                    savedAutofillValue.textValue?.let { state.edit { replace(0, length, it) } }
                    true
                }
            },
    )
}
```

