Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Android docs
FormsWear OS

Wearable value stepper

Adjust a bounded integer safely with large wearable controls.

Public APILumenWearValueStepperWear OS / Compose

Wear OS availability

Use the dedicated Wear artifact

Add com.santi020k:lumen-compose-wear:6.0.0 to your Wear OS module and import this component from com.santi020k.lumen. Wrap content in LumenWearTheme, which defaults to dark appearance and uses LumenThemeScope for tokens, named themes, typography, shapes, and androidx.compose.material3.MaterialTheme roles. Your separate Wear Material provider remains application-owned. Wear UI primitives accept a Compose modifier with Modifier as its default.

The release plan targets this version; confirm Maven Central availability before pinning it.

Native example

Use Wearable value stepper

Use for short integer adjustments such as counts or durations. This is a numeric control; LumenStepper represents workflow progress. Supply localized action labels and a formatter for units. Rotary routing remains host-owned.

Wearable value stepper rendered in the Wear OS emulator Lumen playground
Captured exampleWear OS emulator
kotlin
import androidx.compose.runtime.*
import com.santi020k.lumen.*

@Composable
fun WearCountExample() {
    var count by remember { mutableIntStateOf(5) }
    LumenWearValueStepper("Count", value = count, onValueChange = { count = it },
        valueRange = 1..20)
}

Reference

Public API

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

APIValues or typeDefaultDescription
labelNative localized textRequiredNames the value.
value / onValueChangeInteger binding / value and callbackRequiredPublishes changes only after an enabled interaction.
valueRangeInclusive integer bounds0..100Normalizes reversed bounds and clamps displayed values.
stepInteger1Uses 1 for nonpositive input and clamps each adjustment to the bounds.
enabledBooleantrueDisables all adjustment paths.
decrementLabel / incrementLabelNative localized textDecrease / IncreaseNames the adjustment actions.
formatValueInteger to StringNumeric stringFormats the visible and accessible value.

Native behavior

Design and accessibility

When to use it

Use for short integer adjustments such as counts or durations. This is a numeric control; LumenStepper represents workflow progress. Supply localized action labels and a formatter for units. Rotary routing remains host-owned.

Accessibility

Names the formatted value and increment/decrement actions, exposes adjustable semantics, and disables unavailable changes.

Shared component

Available on other platforms

Apple / SwiftUI
Android docsCompose module