Components / Pickers

Wheel Picker

Scroll the wheel to select an item, using the sample app's picker example.

CupertinoWheelPicker View source ↗

Playground

Live Compose · Wasm
Preview

Click or drag inside the preview to try it out.

Properties

Usage example

Kotlin code for the current playground settings.

Example.kt
kotlin
import androidx.compose.runtime.*import androidx.compose.foundation.layout.*import androidx.compose.ui.Modifierimport androidx.compose.ui.unit.dpimport zone.ien.hig.*import zone.ien.hig.theme.*import androidx.compose.ui.graphics.Colorimport androidx.compose.ui.Alignment
@OptIn(ExperimentalCupertinoApi::class)@Composablefun Example() { CupertinoTheme(colorScheme = lightColorScheme(accent = Color(0xFF007AFF))) { Column(Modifier.fillMaxSize(), verticalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterVertically)) { val items = listOf("Seoul", "Busan", "Daegu", "Incheon", "Gwangju", "Daejeon", "Jeju") val state = rememberCupertinoPickerState() CupertinoWheelPicker(state = state, items = items, modifier = Modifier.fillMaxWidth()) { CupertinoText(it) } } }}

Run examples inside CupertinoTheme. For components using backdrop, attach layerBackdrop to the background content.