{"id":18269764,"url":"https://github.com/skyfe79/composelayout","last_synced_at":"2026-04-29T01:33:42.895Z","repository":{"id":222462403,"uuid":"750830628","full_name":"skyfe79/ComposeLayout","owner":"skyfe79","description":"DSL for UICollectionViewCompositionalLayout or NSCollectionViewCompositionalLayout","archived":false,"fork":false,"pushed_at":"2024-03-24T12:19:44.000Z","size":180,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T03:15:43.911Z","etag":null,"topics":["ios","macos","nscollectionview","nscollectionviewcompositionallayout","uicollectionview","uicollectionviewcompositionallayout"],"latest_commit_sha":null,"homepage":"https://github.com/skyfe79/ComposeLayout","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/skyfe79.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-01-31T12:06:13.000Z","updated_at":"2024-08-14T11:27:16.000Z","dependencies_parsed_at":"2024-11-05T11:41:42.802Z","dependency_job_id":"da1b7220-5207-4630-bccd-d80425f7f8ad","html_url":"https://github.com/skyfe79/ComposeLayout","commit_stats":null,"previous_names":["skyfe79/composelayout"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/skyfe79/ComposeLayout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FComposeLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FComposeLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FComposeLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FComposeLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skyfe79","download_url":"https://codeload.github.com/skyfe79/ComposeLayout/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skyfe79%2FComposeLayout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32407164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ios","macos","nscollectionview","nscollectionviewcompositionallayout","uicollectionview","uicollectionviewcompositionallayout"],"created_at":"2024-11-05T11:37:06.279Z","updated_at":"2026-04-29T01:33:42.878Z","avatar_url":"https://github.com/skyfe79.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ComposeLayout\n\n![license MIT](https://img.shields.io/cocoapods/l/ListKit.svg)\n![Platform](https://img.shields.io/badge/iOS-%3E%3D%2013.0-green.svg)\n![Platform](https://img.shields.io/badge/macOS-%3E%3D%2010.15-orange.svg)\n\nComposeLayout is a DSL for Compositional Layout used in CollectionViews on iOS and MacOS. It is a part of [ListKit](https://github.com/ReactComponentKit/ListKit) that I previously developed and released. I have extracted the Compositional Layout configuration part from ListKit and re-released it as ComposeLayout. \n\n## Installation\n\nComposeLayout only support Swift Package Manager\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/skyfe79/ComposeLayout.git\", from: \"0.0.2\"),\n]\n```\n\n## [Examples](https://github.com/skyfe79/ComposeLayout/tree/main/Examples)\n\nUsing ComposeLayout makes writing complex Compositional Layouts intuitive and easy, allowing for straightforward composition of layouts. When developing iOS apps with UIKit's UICollectionView, ComposeLayout can greatly simplify the process of expressing and managing the layouts of CollectionViews. Below is an example code of Compositional Layout representing a 2-column grid.\n\n```swift\nComposeLayout { index, environment in\n    Section {\n        HGroup(repeatItems: 2) {\n            Item()\n                .width(.fractionalWidth(1.0))\n                .height(.fractionalHeight(1.0))\n        }\n        .interItemSpacing(.fixed(10))\n        .width(.fractionalWidth(1.0))\n        .height(.absolute(44))\n    }\n    .interGroupSpacing(10)\n    .contentInsets(leading: 10, top: 0, trailing: 10, bottom: 0)\n}\n.build()\n```\n\nThe [Example folder](https://github.com/skyfe79/ComposeLayout/tree/main/Examples) in this repository contains sample codes that have been rewritten using ComposeLayout for both iOS and MacOS. These examples are based on the [Modern Collection Views](https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/implementing_modern_collection_views) officially distributed by Apple.\n\n\n## MIT License\n\nCopyright (c) 2024 ComposeLayout\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fcomposelayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskyfe79%2Fcomposelayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskyfe79%2Fcomposelayout/lists"}