{"id":1307,"url":"https://github.com/kean/Align","last_synced_at":"2025-08-02T04:30:47.291Z","repository":{"id":45359158,"uuid":"109870182","full_name":"kean/Align","owner":"kean","description":"Intuitive and powerful Auto Layout library","archived":false,"fork":false,"pushed_at":"2024-10-12T17:24:48.000Z","size":2847,"stargazers_count":355,"open_issues_count":0,"forks_count":17,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-07-08T12:15:49.897Z","etag":null,"topics":["anchors","autolayout","constraints"],"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/kean.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"kean","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-11-07T17:44:34.000Z","updated_at":"2025-06-26T18:26:39.000Z","dependencies_parsed_at":"2023-02-19T02:45:48.394Z","dependency_job_id":"26966ab8-b66b-46ca-849a-5dfdc8f047c5","html_url":"https://github.com/kean/Align","commit_stats":{"total_commits":235,"total_committers":3,"mean_commits":78.33333333333333,"dds":"0.012765957446808529","last_synced_commit":"68a37f76d68eb21bb5e93d291b839d43f1f12068"},"previous_names":["kean/yalta"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/kean/Align","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FAlign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FAlign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FAlign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FAlign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kean","download_url":"https://codeload.github.com/kean/Align/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kean%2FAlign/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334606,"owners_count":24233793,"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-02T02:00:12.353Z","response_time":74,"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":["anchors","autolayout","constraints"],"created_at":"2024-01-05T20:15:43.438Z","updated_at":"2025-08-02T04:30:46.973Z","avatar_url":"https://github.com/kean.png","language":"Swift","funding_links":["https://github.com/sponsors/kean"],"categories":["Layout","autolayout"],"sub_categories":["Other Hardware"],"readme":"![logo](https://user-images.githubusercontent.com/1567433/178810472-8b5f687e-ed7f-491c-99ed-e86e563462ef.png)\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/platforms-iOS%2C%20tvOS%2C%20macOS-lightgrey.svg?colorA=28a745\"\u003e\n\u003c/p\u003e\n\nThe best way to create constraints in code.\n\n- **Semantic**. Align APIs focus on your goals, not the math behind Auto Layout constraints.  \n- **Powerful**. Create multiple constraints with a single line of code.  \n- **Type Safe**. Makes it impossible to create invalid constraints, at compile time.  \n- **Fluent**. Concise and clear API that follows [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/).  \n- **Simple**. Stop worrying about `translatesAutoresizingMaskIntoConstraints` and constraints activation.  \n\nExample usage:\n\n```swift\n// Core API\nview.anchors.top.equal(superview.top)\nview.anchors.width.equal(view.anchors.height * 2)\n\n// Semantic API\nview.anchors.edges.pin(insets: 20) // Pins to superview\nview.anchors.edges.pin(to: superview.safeAreaLayoutGuide, insets: 20)\nview.anchors.width.clamp(to: 10...40)\n```\n\nAnd here's something a bit more powerful:\n\n```swift\nview.anchors.edges.pin(insets: 20, alignment: .center)\n```\n\n\u003cimg src=\"https://user-images.githubusercontent.com/1567433/84931836-5cb7e400-b0a1-11ea-8342-ce76b151fcad.png\" alt=\"pin edges with center alignment\" width=\"331px\"/\u003e\n\n## Documentation\n\nThe [**documentation**](https://kean-docs.github.io/align/documentation/align/) for Align is created using DocC and covers all of its APIs in a clear visual way. There is also a [**cheat sheet**](https://github.com/kean/Align/blob/master/Sources/Align.docc/Resources/align-cheat-sheet.pdf) available that lists all of the available APIs.\n\n\u003ca href=\"https://kean-docs.github.io/align/documentation/align/\"\u003e\n\u003cimg alt=\"Screen Shot 2022-07-13 at 10 08 57 AM\" src=\"https://user-images.githubusercontent.com/1567433/178755429-9420d25e-dad1-4e61-9a22-04139c5746e6.png\"  width=\"858px\"\u003e\n\u003c/a\u003e\n\n## Requirements\n\n| Align          | Swift       | Xcode             | Platforms                    |\n|----------------|-------------|-------------------|------------------------------|\n| Align 3.3      | Swift 5.10  | Xcode 15.3        | iOS 14, tvOS 14, macOS 10.16 |\n| Align 3.0      | Swift 5.6   | Xcode 13.3        | iOS 12, tvOS 12, macOS 10.14 |\n\n## Why Align\n\nAlign strives for clarity and simplicity by following [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). Although most of the APIs are compact, it is a *non-goal* to enable the most concise syntax possible.\n\nAlign is for someone who:\n\n- Prefers fluent high-level APIs\n- Doesn't want to depend on big, complex libraries – Align has only ~330 lines of code\n- Prefers to have as little extensions for native classes as possible – Align adds a single property: `anchors` \n- Doesn't overuse operator overloads, prefers [fast compile times](https://github.com/robb/Cartography/issues/215)\n- Likes [NSLayoutAnchor](https://developer.apple.com/library/ios/documentation/AppKit/Reference/NSLayoutAnchor_ClassReference/index.html) but wishes it had simpler API which didn't require manually activating constraints\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkean%2FAlign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkean%2FAlign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkean%2FAlign/lists"}