Repository Public MIT
1{2 "accessibility" : [3 "A tappable card is a single `Button`: VoiceOver reads its texts as one element with the button trait.",4 "A static card is a container; its header carries the header trait, so rotor navigation by headings works.",5 "Text uses theme fonts and wraps; the card grows with Dynamic Type."6 ],7 "category" : "containers",8 "changelog" : [9 {10 "changes" : [11 "Initial release."12 ],13 "date" : "2026-12-02",14 "version" : "1.0.0"15 }16 ],17 "dependencies" : [18 {19 "id" : "glass-foundation",20 "version" : "1.0.0"21 }22 ],23 "description" : "Content container: opaque for dense content, glass when it floats above other content.",24 "examples" : [25 {26 "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassCardExample: GlassExample {\n public static let componentID = \"glass-card\"\n @State private var openCount = 0\n\n public init() {}\n\n public var body: some View {\n ScrollView {\n VStack(alignment: .leading, spacing: 16) {\n GlassCard(\"Monthly rent\") {\n Text(\"1,450 $\").font(.title2)\n Text(\"Sample listing · 4½ · Plateau\").foregroundStyle(.secondary)\n }\n GlassCard {\n Text(\"A long description wraps on several lines and stays readable because the card is opaque: dense text never sits on glass.\")\n } header: {\n Label(\"About this place\", systemImage: \"text.alignleft\")\n } footer: {\n Text(\"Fictitious data\")\n }\n GlassCard(style: .floating, action: { openCount += 1 }) {\n Label(\"3 listings nearby\", systemImage: \"mappin.and.ellipse\")\n Text(\"Opened \\(openCount) times\").font(.caption)\n }\n .accessibilityHint(\"Opens the list\")\n }\n .padding()\n }\n }\n}\n\n#Preview(\"GlassCard\") { GlassCardExample().glassTheme(.ocean) }\n",27 "title" : "GlassCard example"28 }29 ],30 "files" : [31 {32 "bytes" : 6723,33 "path" : "Components/Containers/GlassCard.swift",34 "sha256" : "db7baea7ff191aa4ec0128184d47364e484853562307cf83743c537626782e15"35 }36 ],37 "frameworks" : [3839 ],40 "id" : "glass-card",41 "kind" : "content-component",42 "license" : "MIT",43 "minimumOS" : {44 "iOS" : "26.0",45 "iPadOS" : "26.0",46 "macOS" : "26.0"47 },48 "name" : "GlassCard",49 "platforms" : [50 "iOS",51 "iPadOS",52 "macOS"53 ],54 "schemaVersion" : 1,55 "sha256" : "7a274704e80048c1d2e7126b4ae3f4a39deda4473a69f63b04ad8da929f611db",56 "symbols" : [57 "GlassCardStyle",58 "GlassCard"59 ],60 "version" : "1.0.0"61}62