Repository Public MIT
1{2 "accessibility" : [3 "The stepper is one adjustable element: label = title, value = the formatted text, swipe up and down to change it.",4 "The value is visible next to the title, in monospaced digits, and moves under the title when the two do not fit on one line.",5 "A bound is conveyed by the disabled button, not by colour."6 ],7 "category" : "selection",8 "changelog" : [9 {10 "changes" : [11 "Release 1.1.0: see the project changelog."12 ],13 "date" : "2026-12-03",14 "version" : "1.1.0"15 },16 {17 "changes" : [18 "Initial release."19 ],20 "date" : "2026-12-02",21 "version" : "1.0.0"22 }23 ],24 "dependencies" : [25 {26 "id" : "glass-foundation",27 "version" : "1.1.0"28 }29 ],30 "description" : "System stepper with bounds, increments and a formatted value.",31 "examples" : [32 {33 "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassStepperExample: GlassExample {\n public static let componentID = \"glass-stepper\"\n @State private var guests = 2\n @State private var dose = 0.5\n @State private var zoom = 1.0\n @State private var fixed = 3\n\n public init() {}\n\n public var body: some View {\n ScrollView {\n VStack(alignment: .leading, spacing: 20) {\n GlassStepper(\"Guests\", value: $guests, in: 1...12)\n\n GlassStepper(\"Dose\", value: $dose, in: 0...2.5, step: 0.25) { value in\n Measurement(value: value, unit: UnitMass.milligrams)\n .formatted(.measurement(width: .abbreviated, usage: .asProvided, numberFormatStyle: .number.precision(.fractionLength(2))))\n }\n\n // The upper bound 4 is not on a step from 0.5 by 0.75: the last press stops at the bound.\n GlassStepper(\"Zoom\", value: $zoom, in: 0.5...4, step: 0.75) { value in\n value.formatted(.percent.precision(.fractionLength(0)))\n }\n\n GlassStepper(\"Seats (fixed by your plan)\", value: $fixed, in: 1...5)\n .disabled(true)\n }\n .padding()\n }\n }\n}\n\n#Preview(\"GlassStepper\") { GlassStepperExample().glassTheme(.crystal) }\n",34 "title" : "GlassStepper example"35 }36 ],37 "files" : [38 {39 "bytes" : 7704,40 "path" : "Forms/Selection/GlassStepper.swift",41 "sha256" : "3c169f0cd9c2dd8e40f993637d61d00043acaab4a670112df0df5dd35c37eb24"42 }43 ],44 "frameworks" : [4546 ],47 "id" : "glass-stepper",48 "kind" : "native-wrapper",49 "license" : "MIT",50 "minimumOS" : {51 "iOS" : "26.0",52 "iPadOS" : "26.0",53 "macOS" : "26.0"54 },55 "name" : "GlassStepper",56 "platforms" : [57 "iOS",58 "iPadOS",59 "macOS"60 ],61 "schemaVersion" : 1,62 "sha256" : "f6a47c441e2daf09435217776bcb44c0f11fc8fd9446c1dd1eecec3c67b18c55",63 "symbols" : [64 "GlassStepperMath",65 "Direction",66 "GlassStepper"67 ],68 "version" : "1.1.0"69}70