When to use it
Load secrets on demand with loadValue and hide them after a delay. The mask never shows the value length.
Show a masked value, such as an API key, with show, hide, and copy actions.
Native example
Load secrets on demand with loadValue and hide them after a delay. The mask never shows the value length.
@Composable
fun DeveloperCredentials(apiKey: String, repository: CredentialsRepository) {
Column(verticalArrangement = Arrangement.spacedBy(LumenSpacing.Lg)) {
LumenSecretValue(label = "API key", value = apiKey)
LumenSecretValue(
label = "Webhook signing secret",
loadValue = { repository.revealWebhookSecret() },
autoHideAfterMillis = 30_000L,
maskLength = 12
)
}
}Reference
The primary shared and platform-specific options exposed by LumenSecretValue.
| API | Values or type | Default | Description |
|---|---|---|---|
| label / value or loadValue / autoHideAfter | field name / secret or loader / auto-hide delay | required / required / never | Load secrets on demand with loadValue and hide them after a delay. |
Native behavior
Load secrets on demand with loadValue and hide them after a delay. The mask never shows the value length.
The toggle exposes expanded state, and loading, hiding, and copy results are announced.
Shared component