{"id":30663534,"url":"https://github.com/actuallytaylor/enumeratedsfsymbols","last_synced_at":"2025-12-11T23:00:59.012Z","repository":{"id":176549601,"uuid":"656523302","full_name":"ActuallyTaylor/EnumeratedSFSymbols","owner":"ActuallyTaylor","description":"Swift Enumeration for SFSymbols","archived":false,"fork":false,"pushed_at":"2025-08-20T23:10:32.000Z","size":753,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T23:04:30.800Z","etag":null,"topics":["sfsymbols","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ActuallyTaylor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["ActuallyTaylor"],"patreon":null,"open_collective":null,"ko_fi":"taylorlineman","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-06-21T05:56:38.000Z","updated_at":"2025-08-20T23:09:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"dad536be-fc5e-4244-80fe-cf645d3d9ac4","html_url":"https://github.com/ActuallyTaylor/EnumeratedSFSymbols","commit_stats":null,"previous_names":["actuallytaylor/sfsymbols","actuallytaylor/enumeratedsfsymbols"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ActuallyTaylor/EnumeratedSFSymbols","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActuallyTaylor%2FEnumeratedSFSymbols","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActuallyTaylor%2FEnumeratedSFSymbols/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActuallyTaylor%2FEnumeratedSFSymbols/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActuallyTaylor%2FEnumeratedSFSymbols/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ActuallyTaylor","download_url":"https://codeload.github.com/ActuallyTaylor/EnumeratedSFSymbols/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActuallyTaylor%2FEnumeratedSFSymbols/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273011002,"owners_count":25030371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sfsymbols","swift"],"created_at":"2025-08-31T17:13:04.761Z","updated_at":"2025-12-11T23:00:58.859Z","avatar_url":"https://github.com/ActuallyTaylor.png","language":"Swift","funding_links":["https://github.com/sponsors/ActuallyTaylor","https://ko-fi.com/taylorlineman"],"categories":[],"sub_categories":[],"readme":"# Enumerated SFSymbols\nEnmumerated SFSymbols gives you access to Apple's SFSymbol library in a type safe and Swifty manner. It get's difficult to remember all of the correct symbol names when using strings to label everything. This enumeration makes it easy to use a type safe interface with SFSymbols with SwiftUI, UIKit and AppKit.\n\n## Install\nAdd the following URL to Swift Package Manager:\n```\nhttps://github.com/ActuallyTaylor/SFSymbols\n```\n\n## Basic Usage\n```swift\nimport SwiftUI\nimport SFSymbols // Import SFSymbols\n\nImage(.sparkles) // Boom 💥, it is that simple.\n```\n\n#### Custom Images\n```swift\nimport SwiftUI\nimport SFSymbols\n\nImage(.custom(\"spaceship\")) // Will use a custom symbol file located in your assets folder!\n```\n\n## Advanced Usage\n### SwiftUI\n#### Images\nThe default Image initializer is replaced with a custom symbol initializer.\n\n```swift\nImage(.hammer)\n```\n\n#### Buttons\nTwo new initializers have been added to Buttons that allow you to initialize them automatically with an SFSymbol label, reducing the amount of code in your views.\n```swift\n// Basic Button initializer \nButton(.fireplace_fill) {\n    print(\"Sit by the fireplace with me!\")\n}\n\n// Button initializer with a role\nButton(.xmark_app_fill, role: .cancel) {\n    print(\"Goodbye!\")\n}\n```\n\n#### Menus\nTwo new initializers have been added to Menus that allow you to automatically create them with an SFSymbol image label.\n```swift\n// Basic menu initializer\nMenu(.command) {\n    Button(\"Hello World!\") {\n        print(\"Hello World!\")\n    }\n}\n\n// Menu initializer with a primary action\nMenu(.command) {\n    Button(\"Hello World!\") {\n        print(\"Hello World!\")\n    }\n} primaryAction: {\n    print(\"Hello World!\")  \n}\n```\n\n#### Labels\nLabels have been given two initializers that allow you to create them with an SFSymbol.\n\n```swift\n// Just a string\nLabel(\"Hello World\", symbol: .figure_wave)\n\n// Localized string key\nLabel(LocalizedStringKey(\"hello.world\"), symbol: .figure_wave)\n```\n\n### UIKit\n#### UIImage\nUIImages have been given a set of initializers that allow you too use SFSymbols directly\n\n```swift\nUIImage(.sparkles)\nUIImage(.sparkles, withConfiguration: /* some UIImage Configuration */)\nUIImage(.sparkles, compatibleWith: .current)\n```\n\n#### UIButton\nUIButtons have been given a system button initializer along with a way to set the image directly to an SFSymbol instead of needing to create a UIImage.\n\n```swift\n// Create a System Button with an SFSymbol\nUIButton.systemButton(with: .figure_wave, target: self, action: /* any selector */)\n\n// Set an image for a certain state\nUIButton.setImage(.figure_wave, for: .normal)\n```\n\n#### DisplayRepresentation.Image\nDisplayRepresentation images have been given initializers. These are only available when you are importing both UIKit and AppIntents.\n\n```swift\nDisplayRepresentation.Image(.sparkles, isTemplate: false)\nDisplayRepresentation.Image(.sparkles, tintColor: .red, symbolConfiguration: /* some symbol configuration */)\n```\n\n#### UIApplicationShortcutIcon\nUIApplicationShortcutIcon have been given an initializer so they can be created with an SFSymbol.\n\n```swift\nUIApplicationShortcutIcon(.sparkles)\n```\n\n### AppKit\n#### NSImage\nNSImages have been given an initializer allowing you to create them using an SFSymbol.\n\n```swift\nNSImage(.sparkles, variableValue: 1.0)\n```\n\n#### NSButton\nNSButtons have been given an initializer that allows you to initialize them with an SFSymbol. This initializer allows you to setup the button to automatically use an SFSymbol with the given variable value.\n```swift\nNSButton(.sparkles, variableValue: 1.0, target: self, action: /* some selector */)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factuallytaylor%2Fenumeratedsfsymbols","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factuallytaylor%2Fenumeratedsfsymbols","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factuallytaylor%2Fenumeratedsfsymbols/lists"}