Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
FormsAndroid

Input group

Join a text field with prefix or suffix text, an icon, or a button in one frame.

Public APILumenInputGroupAndroid / Compose

Native example

Use Input group

Use it for units, domains, and inline actions. Keep addon text short.

Input group rendered in the Android phone emulator Lumen playground
Captured exampleAndroid phone emulatorView dark appearance
kotlin
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import com.santi020k.lumen.*

@Composable
fun WebsiteField() {
    var site by remember { mutableStateOf("lumen") }
    LumenFieldGroup("Website") {
        LumenInputGroup(
            value = site,
            onValueChange = { site = it },
            label = "Website",
            modifier = Modifier.fillMaxWidth(),
            leadingText = "https://",
            trailingText = ".com"
        )
    }
}
Android
A website field joined with muted `https://` and `.com` addons, named by its visible field group label.

Reference

Public API

The primary shared and platform-specific options exposed by LumenInputGroup.

APIValues or typeDefaultDescription
leading / trailing / invalidleading addon / trailing addon / error framenone / none / falseUse it for units, domains, and inline actions.

Native behavior

Design and accessibility

When to use it

Use it for units, domains, and inline actions. Keep addon text short.

Accessibility

The field keeps its own name; addon buttons keep their own names.

Shared component

Available on other platforms

React NativeApple / SwiftUI Web
Android docsCompose module