SPB Git

Repository Public MIT

manifest.json 3.1 KB 65 lines json

1{2  "accessibility" : [3    "The bar is a container labelled \"Breadcrumb\"; each level is a button whose label is its title.",4    "The current location is exposed by a trait and a value, not only by its weight and colour.",5    "Separators are hidden from assistive technologies.",6    "Every level and the menu are reachable with the keyboard (Tab or Full Keyboard Access) and have the platform's minimum hit target.",7    "Titles use theme fonts and follow Dynamic Type; a single remaining level truncates in the middle."8  ],9  "category" : "navigation",10  "changelog" : [11    {12      "changes" : [13        "Initial release."14      ],15      "date" : "2026-12-02",16      "version" : "1.0.0"17    }18  ],19  "dependencies" : [20    {21      "id" : "glass-foundation",22      "version" : "1.0.0"23    }24  ],25  "description" : "Typed path with truncation, an overflow menu and keyboard navigation.",26  "examples" : [27    {28      "code" : "import SwiftUI\nimport SPGlassKit\n\npublic struct GlassBreadcrumbExample: GlassExample {\n    public static let componentID = \"glass-breadcrumb\"\n\n    private static let fullPath: [GlassBreadcrumbItem<Int>] = [\n        GlassBreadcrumbItem(id: 0, title: \"Home\", systemImage: \"house\"),\n        GlassBreadcrumbItem(id: 1, title: \"Projects\"),\n        GlassBreadcrumbItem(id: 2, title: \"2026\"),\n        GlassBreadcrumbItem(id: 3, title: \"Client workshop — été\"),\n        GlassBreadcrumbItem(id: 4, title: \"Photos\"),\n        GlassBreadcrumbItem(id: 5, title: \"Selected 📷\"),\n    ]\n\n    @State private var depth = 6\n\n    public init() {}\n\n    private var path: [GlassBreadcrumbItem<Int>] { Array(Self.fullPath.prefix(depth)) }\n\n    public var body: some View {\n        VStack(alignment: .leading, spacing: 24) {\n            GlassBreadcrumb(path) { id in depth = id + 1 }\n            GlassBreadcrumb(path, maxVisibleItems: 2) { id in depth = id + 1 }\n            GlassBreadcrumb(Array(Self.fullPath.prefix(1))) { _ in }\n\n            Text(\"Current: \\(path.last?.title ?? \"—\")\")\n                .font(.callout)\n                .foregroundStyle(.secondary)\n            Button(\"Go deeper\") { depth = min(depth + 1, Self.fullPath.count) }\n                .disabled(depth == Self.fullPath.count)\n        }\n        .frame(maxWidth: .infinity, alignment: .leading)\n        .padding()\n    }\n}\n\n#Preview(\"GlassBreadcrumb\") { GlassBreadcrumbExample().glassTheme(.emerald) }\n",29      "title" : "GlassBreadcrumb example"30    }31  ],32  "files" : [33    {34      "bytes" : 8275,35      "path" : "Navigation/Navigation/GlassBreadcrumb.swift",36      "sha256" : "32dd9070bd764afbefb305c037fb6c5c8e52937ec84b155488535ffa54f900cf"37    }38  ],39  "frameworks" : [4041  ],42  "id" : "glass-breadcrumb",43  "kind" : "custom-glass",44  "license" : "MIT",45  "minimumOS" : {46    "iOS" : "26.0",47    "iPadOS" : "26.0",48    "macOS" : "26.0"49  },50  "name" : "GlassBreadcrumb",51  "platforms" : [52    "iOS",53    "iPadOS",54    "macOS"55  ],56  "schemaVersion" : 1,57  "sha256" : "8927f8bf9d69c323f191bd9e5252ffb666e8cace14ee275d792fb4de89e53724",58  "symbols" : [59    "GlassBreadcrumbItem",60    "GlassBreadcrumbLayout",61    "GlassBreadcrumb"62  ],63  "version" : "1.0.0"64}65
Files main
Menu

Theme