SPB Git

Repository Public MIT

manifest.json 2.6 KB 67 lines json

1{2  "accessibility" : [3    "A label is mandatory in the initialiser; a symbol alone is never the accessible name.",4    "The tappable area is at least 44 × 44 points on iOS and iPadOS, and 24 × 24 on macOS, at every size.",5    "The label is also the tooltip on macOS (`.help`).",6    "State must not rely on the symbol colour alone: change the symbol or the label, as in the example."7  ],8  "category" : "buttons",9  "changelog" : [10    {11      "changes" : [12        "Initial release."13      ],14      "date" : "2026-12-02",15      "version" : "1.0.0"16    }17  ],18  "dependencies" : [19    {20      "id" : "glass-components-support",21      "version" : "1.0.0"22    },23    {24      "id" : "glass-foundation",25      "version" : "1.0.0"26    }27  ],28  "description" : "Symbol-only glass button with a mandatory accessibility label and a full-size hit target.",29  "examples" : [30    {31      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassIconButtonExample: GlassExample {\n    public static let componentID = \"glass-icon-button\"\n    @State private var isFavourite = false\n\n    public init() {}\n\n    public var body: some View {\n        HStack(spacing: 16) {\n            GlassIconButton(systemImage: \"square.and.arrow.up\", accessibilityLabel: \"Share\") {}\n            GlassIconButton(\n                systemImage: isFavourite ? \"star.fill\" : \"star\",\n                accessibilityLabel: isFavourite ? \"Remove from favourites\" : \"Add to favourites\",\n                variant: .prominent\n            ) { isFavourite.toggle() }\n            GlassIconButton(systemImage: \"trash\", accessibilityLabel: \"Delete\", role: .destructive, size: .small) {}\n            GlassIconButton(systemImage: \"ellipsis\", accessibilityLabel: \"More\", size: .large) {}\n        }\n        .padding()\n    }\n}\n\n#Preview(\"GlassIconButton\") { GlassIconButtonExample() }\n",32      "title" : "GlassIconButton example"33    }34  ],35  "files" : [36    {37      "bytes" : 4469,38      "path" : "Components/Buttons/GlassIconButton.swift",39      "sha256" : "21a95d6f8637da4e67b7534722ec628ed490d19a1e037ec6735b711e6dc574b7"40    }41  ],42  "frameworks" : [4344  ],45  "id" : "glass-icon-button",46  "kind" : "native-wrapper",47  "license" : "MIT",48  "minimumOS" : {49    "iOS" : "26.0",50    "iPadOS" : "26.0",51    "macOS" : "26.0"52  },53  "name" : "GlassIconButton",54  "platforms" : [55    "iOS",56    "iPadOS",57    "macOS"58  ],59  "schemaVersion" : 1,60  "sha256" : "c813413d100ccf509cc25d56bf3aa29091f212a66f271062dee34af330c6de38",61  "symbols" : [62    "GlassIconButton",63    "GlassIconButtonMetrics"64  ],65  "version" : "1.0.0"66}67
Files main
Menu

Theme