suiss/uim · Pattern
Picker
A select field that opens a list of options anchored below it, with optional groups and separators.
Picker is an open-source mobile pattern from suiss/uim: components composed into a flow for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.


import * as React from "react"
import { View } from "react-native"
import { Picker, PickerGroup, PickerItem, PickerSeparator } from "@/components/patterns/picker"
import { Text } from "@/components/ui/text"
function PickerDemo() {
const [value, setValue] = React.useState<string>()
return (
<View className="gap-2">
<Picker
value={value}
onValueChange={setValue}
placeholder="Select a fruit"
accessibilityLabel="Fruit"
className="w-56"
>
<PickerGroup label="Fruits">
<PickerItem value="cherry">Cherry</PickerItem>
<PickerItem value="banana">Banana</PickerItem>
<PickerItem value="mango">Mango</PickerItem>
</PickerGroup>
<PickerSeparator />
<PickerGroup label="Vegetables">
<PickerItem value="carrot">Carrot</PickerItem>
<PickerItem value="spinach" disabled>
Spinach
</PickerItem>
</PickerGroup>
</Picker>
<Text className="text-sm text-label-secondary">
Selected: {value ?? "none"}
</Text>
</View>
)
}
export function PickerExample() {
return (
<PickerDemo />
)
}import EsuissUI
import SwiftUI
struct PickerDemo: View {
@State private var value: String?
var body: some View {
VStack(alignment: .leading, spacing: 8) {
OptionPicker(selection: $value, placeholder: "Select a fruit") {
OptionPickerGroup("Fruits") {
OptionPickerItem("Cherry", value: "cherry")
OptionPickerItem("Banana", value: "banana")
OptionPickerItem("Mango", value: "mango")
}
OptionPickerSeparator()
OptionPickerGroup("Vegetables") {
OptionPickerItem("Carrot", value: "carrot")
OptionPickerItem("Spinach", value: "spinach")
.disabled(true)
}
}
.frame(width: 224)
.accessibilityLabel(Text("Fruit"))
Text(verbatim: "Selected: \(value ?? "none")")
.textStyle(.sm)
.foregroundStyle(Color.labelSecondary)
}
}
}import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import com.esuiss.ui.components.Text
import com.esuiss.ui.patterns.Picker
import com.esuiss.ui.patterns.PickerGroup
import com.esuiss.ui.patterns.PickerItem
import com.esuiss.ui.patterns.PickerSeparator
import com.esuiss.ui.theme.EsuissTheme
import com.esuiss.ui.theme.Typography
@Composable
fun PickerDefault() {
var value by rememberSaveable { mutableStateOf<String?>(null) }
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Picker(
value = value,
onValueChange = { value = it },
modifier = Modifier.width(224.dp).semantics { contentDescription = "Fruit" },
placeholder = "Select a fruit",
) {
PickerGroup(label = "Fruits") {
PickerItem("cherry", "Cherry")
PickerItem("banana", "Banana")
PickerItem("mango", "Mango")
}
PickerSeparator()
PickerGroup(label = "Vegetables") {
PickerItem("carrot", "Carrot")
PickerItem("spinach", "Spinach", enabled = false)
}
}
Text("Selected: ${value ?: "none"}", style = Typography.sm.copy(color = EsuissTheme.colors.labelSecondary))
}
}Picker composes Select: a SelectTrigger showing the current value and a SelectContent popup with the options. The selected option shows a check mark.
Use it to choose one value from a short or grouped list in a form.
Installation
$ pnpm dlx @esuiss/uim@latest add picker$ pnpm dlx @esuiss/uim@latest add picker --platform swift$ pnpm dlx @esuiss/uim@latest add picker --platform kotlinThe CLI also adds what it builds on: Select.
Manual
-
Add the pieces it builds on: Select.
-
Copy the source into
components/patterns/picker.tsx:
import * as React from "react"
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectSeparator,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
type PickerItemData = {
value: string
label: React.ReactNode
}- Update the import paths to match your project.
-
Add the pieces it builds on: Select.
-
Copy the source into
components/patterns/picker.tsx:
import * as React from "react"
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectSeparator,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
type PickerItemData = {
value: string
label: React.ReactNode
}- Update the import paths to match your project.
-
Add the pieces it builds on: Select.
-
Copy the source into
components/patterns/picker.tsx:
import * as React from "react"
import type { StyleProp, ViewStyle } from "react-native"
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectSeparator,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
type PickerItemData = {
value: string
label: React.ReactNode- Update the import paths to match your project.
-
Target iOS 17 or later.
-
Add the Swift package to your app:
.package(url: "https://github.com/phosphor-icons/swift", from: "2.1.0")- Copy the theme files every view uses:
import SwiftUI
import UIKit
struct RGBA: Sendable {
let red: CGFloat
let green: CGFloat
let blue: CGFloat
let alpha: CGFloat
init(_ hex: UInt32, _ alpha: CGFloat = 1) {
red = CGFloat((hex >> 16) & 0xFF) / 255
green = CGFloat((hex >> 8) & 0xFF) / 255
blue = CGFloat(hex & 0xFF) / 255
self.alpha = alpha
}import SwiftUI
extension Color {
public static let surface = Color.adaptive(light: .init(0xFFFFFF), dark: .init(0x000000))
public static let surfaceSecondary = Color.adaptive(light: .init(0xF5F5F7), dark: .init(0x161617))
public static let surfaceTertiary = Color.adaptive(light: .init(0xE8E8ED), dark: .init(0x2C2C2E))
public static let surfaceRaised = Color.adaptive(light: .init(0xFFFFFF), dark: .init(0x1D1D1F))
public static let label = Color.adaptive(light: .init(0x1D1D1F), dark: .init(0xF5F5F7))
public static let labelSecondary = Color.adaptive(light: .init(0x6E6E73), dark: .init(0xA1A1A6))
public static let labelTertiary = Color.adaptive(light: .init(0x86868B), dark: .init(0x86868B))
public static let labelQuaternary = Color.adaptive(light: .init(0xD2D2D7), dark: .init(0x424245))
public static let control = Color.adaptive(light: .init(0x000000, 0.04), dark: .init(0xFFFFFF, 0.1))
public static let controlPressed = Color.adaptive(light: .init(0x000000, 0.12), dark: .init(0xFFFFFF, 0.22))
public static let controlSelected = Color.adaptive(light: .init(0x1D1D1F), dark: .init(0xF5F5F7))
public static let controlDisabled = Color.adaptive(light: .init(0x000000, 0.03), dark: .init(0xFFFFFF, 0.05))
public static let onControlSelected = Color.adaptive(light: .init(0xFFFFFF), dark: .init(0x000000))- Copy the source and every file it uses:
import PhosphorSwift
import SwiftUI
extension EnvironmentValues {
@Entry var optionPickerNative = false
}
public struct OptionPicker<Value: Hashable & Sendable, Content: View>: View {
public typealias Size = SelectSize
let selection: Binding<Value?>
let placeholder: LocalizedStringKey
let size: Size
let content: () -> Content
@State private var labels: [AnyHashable: Text] = [:]import SwiftUI
public struct VariantButtonStyle: ButtonStyle {
public enum Variant: CaseIterable, Sendable {
case `default`, outline, secondary, tinted, ghost, plain, destructive, link
}
public enum Size: CaseIterable, Sendable {
case `default`, xs, sm, lg, xl, icon, iconXs, iconSm, iconLg, iconXl
var height: CGFloat {
switch self {
case .xs, .iconXs: 24
case .sm, .iconSm: 32
case .default, .icon: 36
case .lg, .iconLg: 44import SwiftUI
extension EnvironmentValues {
@Entry var buttonGroup: Axis? = nil
@Entry var buttonGroupSize: CGSize = .zero
}
enum ButtonGroupSpace: Hashable {
case group
}
struct ButtonGroupFrame {
let bounds: Anchor<CGRect>
let outlined: Bool
}import PhosphorSwift
import SwiftUI
extension Shadow {
static let control = Shadow(color: .black.opacity(0.08), radius: 0.5, y: 0.5)
static let thumb = Shadow(color: .black.opacity(0.12), radius: 1.5, y: 1)
}
struct SelectionIndicator<Mark: View>: View {
let checked: Bool
let pressed: Bool
let cornerRadius: CGFloat
let mark: Mark
@Environment(\.isEnabled) private var isEnabled
@Environment(\.isInvalid) private var invalidimport PhosphorSwift
import SwiftUI
enum MenuPresentation: Sendable {
case system, popup
}
extension EnvironmentValues {
@Entry var menuPresentation: MenuPresentation = .system
@Entry var menuRadio = MenuRadioContext()
}
struct MenuRadioContext: @unchecked Sendable {
var selected: AnyHashable?
var select: @MainActor @Sendable (AnyHashable) -> Void = { _ in }
}import SwiftUI
extension EnvironmentValues {
@Entry public var isInvalid = false
@Entry var fieldInset = false
@Entry var fieldGroupInset = false
@Entry var fieldSetInset = false
}
extension View {
public func invalid(_ isInvalid: Bool = true) -> some View {
environment(\.isInvalid, isInvalid)
}
}
public enum FieldOrientation: CaseIterable, Sendable {import SwiftUI
extension EnvironmentValues {
@Entry public var hapticsEnabled = true
}
extension View {
public func haptics(_ enabled: Bool) -> some View {
environment(\.hapticsEnabled, enabled)
}
func hapticFeedback<Trigger: Equatable>(_ feedback: SensoryFeedback, trigger: Trigger) -> some View {
modifier(HapticFeedbackModifier(feedback: feedback, trigger: trigger) { _, _ in true })
}
func hapticFeedback<Trigger: Equatable>(import PhosphorSwift
import Observation
import SwiftUI
public enum PopupAlignment: Sendable, CaseIterable {
case start, center, end
}
struct OverlayDismiss: Sendable {
let action: @MainActor @Sendable () -> Void
@MainActor func callAsFunction() {
action()
}
}import PhosphorSwift
import SwiftUI
struct SelectContext: @unchecked Sendable {
var selected: AnyHashable?
var registering = false
var select: @MainActor @Sendable (AnyHashable) -> Void = { _ in }
}
extension EnvironmentValues {
@Entry var select = SelectContext()
}
struct SelectLabelsKey: PreferenceKey {
static var defaultValue: [AnyHashable: Text] { [:] }import SwiftUI
public struct Separator: View {
let orientation: Axis
public init(_ orientation: Axis = .horizontal) {
self.orientation = orientation
}
public var body: some View {
Rectangle()
.fill(Color.separator)
.frame(width: orientation == .vertical ? 1 : nil, height: orientation == .horizontal ? 1 : nil)
.frame(maxWidth: orientation == .horizontal ? .infinity : nil, maxHeight: orientation == .vertical ? .infinity : nil)
.accessibilityHidden(true)
}import SwiftUI
public enum TextVariant: CaseIterable, Sendable {
case `default`, h1, h2, h3, h4, p, blockquote, code, lead, large, small, muted
var style: TextStyle {
switch self {
case .h1: .xl3
case .h2: .xl2
case .h3: .xl
case .h4, .lead, .large: .lg
case .code, .small, .muted: .sm
default: .base
}
}import SwiftUI
extension EnvironmentValues {
@Entry var patternCompact: Bool? = nil
}
@propertyWrapper
struct CompactLayout: DynamicProperty {
@Environment(\.patternCompact) private var forced
@Environment(\.horizontalSizeClass) private var sizeClass
init() {}
var wrappedValue: Bool {
forced ?? (sizeClass != .regular)
}- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
implementation(platform("androidx.compose:compose-bom:2026.09.00"))
implementation("androidx.compose.foundation:foundation")
implementation("androidx.compose.ui:ui")
implementation("com.adamglin:phosphor-icon-android:1.0.0")- Copy the theme files every view uses:
package com.esuiss.ui.theme
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.dropShadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.shadow.Shadow as DropShadow
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.LineHeightStyle
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.DpOffsetpackage com.esuiss.ui.theme
import androidx.compose.runtime.Immutable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
@Immutable
data class Colors(
val surface: Color,
val surfaceSecondary: Color,
val surfaceTertiary: Color,
val surfaceRaised: Color,
val label: Color,
val labelSecondary: Color,
val labelTertiary: Color,
val labelQuaternary: Color,- Copy the source and every file it uses:
package com.esuiss.ui.patterns
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.ui.Modifier
import com.esuiss.ui.components.Select
import com.esuiss.ui.components.SelectGroup
import com.esuiss.ui.components.SelectItem
import com.esuiss.ui.components.SelectLabel
import com.esuiss.ui.components.SelectSeparator
import com.esuiss.ui.components.SelectSize
@Immutable
class PickerItemData(
val value: String,package com.esuiss.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsPressedAsState
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShapepackage com.esuiss.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.CornerSize
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.Immutablepackage com.esuiss.ui.components
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
val LocalContentStyle = compositionLocalOf { TextStyle.Default }
val LocalContentColor = compositionLocalOf { Color.Unspecified }
val LocalIconSize = compositionLocalOf { 20.dp }package com.esuiss.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.LayoutScopeMarker
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextpackage com.esuiss.ui.components
import android.provider.Settings
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.text.selection.TextSelectionColors
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Sizepackage com.esuiss.ui.components
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.takeOrElse
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.unit.Dp
import com.esuiss.ui.theme.EsuissTheme
@Composable
fun Icon(
imageVector: ImageVector,package com.esuiss.ui.components
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.text.BasicText
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import com.esuiss.ui.theme.EsuissTheme
import com.esuiss.ui.theme.Typography
@Composablepackage com.esuiss.ui.components
import android.os.Build
import android.view.Window
import android.view.WindowManager
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.AnimatedVisibilityScope
import androidx.compose.animation.EnterExitState
import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.scaleIn
import androidx.compose.animation.scaleOut
import androidx.compose.animation.slideInpackage com.esuiss.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsPressedAsState
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightInpackage com.esuiss.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.esuiss.ui.theme.EsuissTheme
@Composable
fun Separator(- Update the
com.esuiss.uipackage names to match your project.
Usage
import { Picker, PickerGroup, PickerItem, PickerSeparator } from "@/components/patterns/picker"<PickerDemo />List PickerItems as children, optionally inside PickerGroups separated by PickerSeparator. The picker collects the items from its children to show the selected label, or you can pass items directly.
Use it uncontrolled with defaultValue, or controlled with value and onValueChange. placeholder shows while nothing is selected.
Examples
States
A small picker with a value, an invalid picker and a disabled picker.


import { View } from "react-native"
import { Picker, PickerItem } from "@/components/patterns/picker"
export function PickerStatesExample() {
return (
<View className="gap-3">
<Picker defaultValue="banana" size="sm" className="w-56">
<PickerItem value="cherry">Cherry</PickerItem>
<PickerItem value="banana">Banana</PickerItem>
</Picker>
<Picker placeholder="Invalid" invalid className="w-56">
<PickerItem value="cherry">Cherry</PickerItem>
</Picker>
<Picker placeholder="Disabled" disabled className="w-56">
<PickerItem value="cherry">Cherry</PickerItem>
</Picker>
</View>
)
}import EsuissUI
import SwiftUI
struct PickerStates: View {
@State private var small: String? = "banana"
@State private var invalid: String?
@State private var disabled: String?
var body: some View {
VStack(alignment: .leading, spacing: 12) {
OptionPicker(selection: $small, size: .sm) {
OptionPickerItem("Cherry", value: "cherry")
OptionPickerItem("Banana", value: "banana")
}
.frame(width: 224)
OptionPicker(selection: $invalid, placeholder: "Invalid") {
OptionPickerItem("Cherry", value: "cherry")
}
.frame(width: 224)
.invalid()
OptionPicker(selection: $disabled, placeholder: "Disabled") {
OptionPickerItem("Cherry", value: "cherry")
}
.frame(width: 224)
.disabled(true)
}
}
}import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.esuiss.ui.components.SelectSize
import com.esuiss.ui.patterns.Picker
import com.esuiss.ui.patterns.PickerItem
@Composable
fun PickerStates() {
var fruit by rememberSaveable { mutableStateOf<String?>("banana") }
var invalid by rememberSaveable { mutableStateOf<String?>(null) }
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
Picker(
value = fruit,
onValueChange = { fruit = it },
modifier = Modifier.width(224.dp),
size = SelectSize.Sm,
) {
PickerItem("cherry", "Cherry")
PickerItem("banana", "Banana")
}
Picker(
value = invalid,
onValueChange = { invalid = it },
modifier = Modifier.width(224.dp),
placeholder = "Invalid",
invalid = true,
) {
PickerItem("cherry", "Cherry")
}
Picker(
value = null,
onValueChange = {},
modifier = Modifier.width(224.dp),
placeholder = "Disabled",
enabled = false,
) {
PickerItem("cherry", "Cherry")
}
}
}API Reference
Picker
The root that renders the trigger and the options popup.
- About
- The selected value when controlled.
- Type
string- Default
- —
- About
- The initial value when uncontrolled.
- Type
string- Default
- —
- About
- Called with the new value when an option is chosen.
- Type
(value: string) => void- Default
- —
- About
- Text shown when no value is selected.
- Type
string- Default
- —
- About
{ value, label }pairs used to show the selected label; collected from children when omitted.- Type
PickerItemData[]- Default
- —
- About
- Trigger height:
smordefault. - Type
"sm""default"- Default
- "default"
- About
- Prevents opening the list.
- Type
boolean- Default
- —
- About
- Applies the error style to the trigger.
- Type
boolean- Default
- —
- Type
string- Default
- —
- About
- Label for the trigger.
- Type
string- Default
- —
- About
- Links the trigger to a visible label.
- Type
string- Default
- —
- Type
React.ReactNode- Default
- —
PickerGroup
Groups options under an optional label.
- About
- Heading shown above the group.
- Type
string- Default
- —
- Type
React.ReactNode- Default
- —
PickerItem
One selectable option.
- About
- The value this option selects.
- Type
string- Default
- required
- About
- Prevents choosing this option.
- Type
boolean- Default
- —
- Type
React.ReactNode- Default
- —
Accessibility
- Give the picker an
accessibilityLabeloraccessibilityLabelledBy, since the trigger shows only the value.
Notes
- The popup uses
bg-surface-raisedwith a subtle border that is stronger in dark mode. - The popup fades in and out, and respects the system reduce motion setting.
- On iOS the popup renders in a full-window overlay so it appears above native screens.