Backpack-SwiftUI/Nudger
Default
Day | Night |
---|---|
![]() |
![]() |
Usage
an adjustable control that allows a user to select a numerical value between a min/max determined by the consumer.
struct NudgerExampleView: View {
@State private var value = 0
var body: some View {
VStack {
BPKNudger(value: $value, min: 1, max: 10, step: 1)
.accessibilityLabel("Passengers")
BPKNudger(title: "Adults", subtitle: "Aged 16+", value: $value, min: 1, max: 10)
BPKNudger(title: "Rooms", value: $value, min: 1, max: 10)
BPKNudger(title: "Rooms", icon: .room, value: $value, min: 1, max: 10)
BPKNudger(
title: "Travellers",
subtitle: "Aged 16 and older",
icon: .adult,
value: $value,
min: 1,
max: 10
)
}
.padding()
}
}