{"id":19194847,"url":"https://github.com/99yuseong/spacer","last_synced_at":"2026-04-14T06:33:41.842Z","repository":{"id":260277697,"uuid":"880839165","full_name":"99yuseong/Spacer","owner":"99yuseong","description":"SwiftUI spacer() modifier to add flexible spacing to your views.","archived":false,"fork":false,"pushed_at":"2024-11-08T04:56:15.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T04:32:32.503Z","etag":null,"topics":["infinity","layout","maxheight","maxwidth","spacer","swiftui","ui"],"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/99yuseong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2024-10-30T13:07:27.000Z","updated_at":"2024-11-23T10:35:12.000Z","dependencies_parsed_at":"2024-10-30T14:33:11.488Z","dependency_job_id":"7180f6af-c3db-45c2-832c-b694628b8c4e","html_url":"https://github.com/99yuseong/Spacer","commit_stats":null,"previous_names":["99yuseong/spacer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/99yuseong/Spacer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99yuseong%2FSpacer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99yuseong%2FSpacer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99yuseong%2FSpacer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99yuseong%2FSpacer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/99yuseong","download_url":"https://codeload.github.com/99yuseong/Spacer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/99yuseong%2FSpacer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265472389,"owners_count":23771867,"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","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":["infinity","layout","maxheight","maxwidth","spacer","swiftui","ui"],"created_at":"2024-11-09T12:06:05.834Z","updated_at":"2026-04-14T06:33:41.815Z","avatar_url":"https://github.com/99yuseong.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spacer\n\nA Swift Package that simplifies layout adjustments by allowing the placement of spacers based on `Edge.Set` positions. This package helps maintain clean, readable code while enhancing layout flexibility in SwiftUI.\n\n## Features\n\n- Place `Spacer` in specific locations (`.leading`, `.trailing`, `.top`, `.bottom`, `.horizontal`, `.vertical` `.all`) with a single modifier.\n- Set minimum lengths for each spacer, providing full control over layout gaps.\n- Streamline complex layouts while keeping SwiftUI code readable.\n\n## Usage\n\nUse `.spacer()` modifier with `Edge.Set` and optional `minLength` to add flexible spacing to your views.\n\n### Ex) Leading Spacer\n\n```swift\nText(\"Leading Text\")\n    .spacer(.leading)\n```\n\n### Ex) Trailing Spacer\n\n```swift\nText(\"Trailing Text\")\n    .spacer(.trailing, minLength: 10)\n```\n\n### Ex) Spacer for vertical stacks\n\n```swift\nimport Spacer\n\nstruct ContentView: View {\n  var body: some View {\n    VStack {\n      MyLabel(\"My Label\")\n        .spacer(.trailing)\n\n      MyButton(\"My Button\") {\n        print(\"Button tapped\")\n      }\n      .spacer(.bottom, minLength: 20)\n    }\n  }\n}\n```\n\n## Requirements\n\n- iOS 13.0+\n\n## Installation\n\n### Swift Package Manager\n\n[Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.\n\nTo integrate `Spacer` into your Xcode project using Swift Package Manager, add it to the dependencies value of your `Package.swift`:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/99yuseong/Spacer.git\", .upToNextMajor(from: \"1.0.0\"))\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F99yuseong%2Fspacer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F99yuseong%2Fspacer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F99yuseong%2Fspacer/lists"}