A lightweight Swift library for declarative UI styling and layout patterns on top of UIKit and Auto Layout.
Layoutless is a Swift library that helps iOS developers write less UI code by providing a declarative way to style and layout views. It abstracts common Auto Layout patterns and offers a consistent styling approach, reducing boilerplate and improving code maintainability.
iOS and tvOS developers building UIKit-based applications who want to simplify UI code and adopt a more declarative layout and styling approach.
Developers choose Layoutless for its lightweight design (around 1k lines of code), focus on abstraction without heavy DSLs, and ability to handle complex scenarios like dynamic layout changes with minimal effort.
Write less UI code
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At around 1k lines of code, Layoutless is minimal and easy to integrate without adding significant bloat, as highlighted in the README.
Abstracts common patterns like stacking, insetting, and filling parent views with a simple API, reducing verbose Auto Layout code, as shown in the walkthrough example.
Uses type-safe Style objects and Stylesheets for consistent view styling, allowing reusable closures that apply properties like fonts and colors, demonstrated in the styling section.
Layout sets enable conditional layouts based on traits like screen size or orientation, making responsive design straightforward with trait queries, as described in the advanced section.
Limited to UIKit and does not support SwiftUI, which is a significant drawback for teams adopting Apple's newer UI framework.
For dynamic layout changes, the app's key window must be a Layoutless Window subclass, adding complexity and potential vendor lock-in, as admitted in the README.
Requires using Layoutless subclasses like View or Label instead of standard UIKit classes, which can conflict with existing custom view hierarchies and increase migration effort.